Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Communication method for new topologies #6

Open
frm opened this issue Feb 28, 2018 · 4 comments
Open

Communication method for new topologies #6

frm opened this issue Feb 28, 2018 · 4 comments

Comments

@frm
Copy link
Contributor

frm commented Feb 28, 2018

Is there any preferred method of communication between processes? In particular using the underlying Erlang Node connections vs implementing something using gen_tcp or equivalent.

@michalmuskala
Copy link
Contributor

In general, from what I've heard in "battle stories" it might be advantageous to use the erlang distribution as a control plane and have separate tcp connections for actually sending data.

Right now big messages may clog the pipe and stall the heartbeat messages leading to a disconnection. At Lambda Days Peer (from GRISP) said, though, that they are looking into fixing this one.

Another consideration is that things like partisan don't use the default message sending and implement a completely separate layer for sending messages across processes (there might be even multiple "channels" between nodes). If we want to leverage this, I think we should do some sort of interface for delivering a message instead of using the built-in send.

@chrismccord
Copy link
Member

The topology handles the remote pid communication. So our default disterl topology will use send, but others can implement their own mechanisms.

@frm
Copy link
Contributor Author

frm commented Feb 28, 2018

In Firenest.Topology we have the following definition: @callback send(t, node, name, message :: term) :: :ok | {:error, term}

But in the case of using something akin to gen_tcp, wouldn't the node have to be an IP? At most, we can assume the topology can internally map nodes to IP addresses or sockets.

@bitwalker
Copy link

bitwalker commented Feb 28, 2018

The topology by definition would be responsible for translating the node name to something meaningful for its transport. The most trivial example could be using DNS A records to get an IP in the case of using :gen_tcp - in fact I think that's more or less how disterl does things today when you get down to the meat of it.

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

No branches or pull requests

4 participants