Git Product home page Git Product logo

Comments (13)

clockworksoul avatar clockworksoul commented on July 26, 2024

Hi Adirio,

I haven't spent much time looking at this project recently, but I've been looking for a reason to come back to it.

If it's something that you would find useful, I would be happy to implement it for you.

from smudge.

Adirio avatar Adirio commented on July 26, 2024

That feature and IPv6 support, as I found while lookig at the code that only IPv4 support is provided, are two things that would be quite nice.

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

Taking a look at multicast support now.

from smudge.

eelcocramer avatar eelcocramer commented on July 26, 2024

I'm wondering if multicast discovery should be left up to the application using smudge.

For example you could have 2 applications on a network that both use smudge to broadcast messages but should not connect to each others nodes as they do not share the same message model.

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

It seems appropriate for Smudge to do as part of the discovery process, but you're right that we need some way to distinguish between multiple collections that happen to share the same network.

Elasticsearch solves this problem by requiring that each cluster have a name/I'd set in each node by configuration, and announcements from nodes with a different name are simply ignored.

Thoughts?

from smudge.

eelcocramer avatar eelcocramer commented on July 26, 2024

That could work. That name should be replace foobar in the mdns example in this repo: https://github.com/hashicorp/mdns.

I also think that multicast discovery should be optional.

from smudge.

Adirio avatar Adirio commented on July 26, 2024

I agree, discovery options should be configurable: the user has the option to introduce some seeds him/herself or use multicast discovery by providing a namespace.

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

Absolutely agree on all points.

I've almost got a working prototype together if you're interested (the issue6-multicast branch). Keep in mind that it's a feature-incomplete WIP though.

from smudge.

Adirio avatar Adirio commented on July 26, 2024

membership.go lines 211-234:

func getMulticastAddress() string {
	if ipLen == net.IPv4len {
		if multicastAddress == "" {
			if ipLen == net.IPv6len {
				multicastAddress = defaultIPv6MulticastAddress
			} else if ipLen == net.IPv4len {
				multicastAddress = defaultIPv4MulticastAddress
			} else {
				logFatal("Failed to determine IPv4/IPv6")
			}
		}
	}

	return multicastAddress
}

You probably want to remove the outter if ipLen == net.IPv4len as it will not work properly for IPv6. You have the IP version check inside.

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

Wait, what's that doing there? 😆

Good catch. I have no idea what I was thinking.

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

I created PR #13 if you'd like to take a look at what I have.

If anybody wants to be a full-fledged collaborator so you can do proper code reviews, I'm certainly open to that as well. :)

from smudge.

clockworksoul avatar clockworksoul commented on July 26, 2024

Merged #13.

from smudge.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.