partisan
partisan copied to clipboard
Send assumes connection is established for channel.
Right now, in do_send_message in the default peer service manager, it's assumed that if a node is connected, that a connection is open for the channel.
Options:
- Since the default channel is always the first established, use the default channel for the message if a message specific channel has not been established yet; or
- Buffer the message until the channel for those types of messages is established.
Thoughts? @slfritchie @seancribbs @tsloughter
What sorts of guarantees does a channel provide? If there's an expectation of linearizability of a sequence of messages from the same origin process over the channel, I would not take option A. If the default channel is overloaded (or buffering, or changing window size, etc), you could have messages delivered out of order.
Partisan currently uses option A, ie fallbacks to the default channel connection.
In v5.0.0-beta we have fast connection status checks by channel, so we can use this to implement option B or any other option.
I would like to have this to be managed by user prefs ie decision to fallback in default channel or to queue messages by channel.