Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a channel between nodes without a central server? #10

Closed
andrew-kennedy opened this issue May 18, 2016 · 6 comments
Closed

Implement a channel between nodes without a central server? #10

andrew-kennedy opened this issue May 18, 2016 · 6 comments

Comments

@andrew-kennedy
Copy link

I'd like to allow nodes to communicate without needing to use redis or sockets.io, is there a recommended way to do this in gaggle, assuming I have the IPs of the nodes?

@ben-ng
Copy link
Owner

ben-ng commented May 18, 2016

I haven't written a channel like that yet, but it's totally doable.

  1. Duplicate an existing channel and name it p2p-channel or something like that.
  2. Modify the options so that the user can specify what nodes are in the cluster.
  3. Use net.socket (docs) or similar to send & receive messages.

@andrew-kennedy
Copy link
Author

thank you! I just now noticed the channel-interface file. I'll look into it.

@andrew-kennedy
Copy link
Author

I noticed something else, in the readme you use a channel with name: redis, and redisName: foo, but then later have a channel with name: redis and channelName: foo. Is there a reason for this distinction/naming convention? what's the difference between the channelName and the name?

@andrew-kennedy
Copy link
Author

@ben-ng I'm sort of new to node.js programming, would the p2p channel effectively need to start a TCP server in the constructor so that each node has a server? And then in the _connect method there would be logic connecting to each node? I'm just a bit confused as to how the concept of a Channel maps to a bunch of nodes. Each example channel connects to one external service at the moment.

@ben-ng
Copy link
Owner

ben-ng commented Jun 9, 2016

Yes, the channel would start a server and then connect to each node.

@ben-ng
Copy link
Owner

ben-ng commented Oct 29, 2016

Closing in favor of #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants