Proxy messaging #1374
Replies: 4 comments
-
Of course this is just an initial idea with no actual technical specs. Details like message format, multi-part messages, encryption algorithms, and files upload support, and other details can be detailed once initial idea is approved. |
Beta Was this translation helpful? Give feedback.
-
An alternative might be waku |
Beta Was this translation helpful? Give feedback.
-
E2E encryption using public/private keypair is pretty resource expensive, a keypair handshake exchanging symmetric keys is preferable especially when exchanging files for example. |
Beta Was this translation helpful? Give feedback.
-
Introduction
Currently we use
RMB
for the general client<->node communication. There are some special cases when the client can't run his own instance of RMB then he uses aproxy
to do it for you. But for the simplicity of this document we will not discuss the current proxy scenario and instead focus on the generalRMB
toRMB
communication.But why RMB?
Rmb initially was intended to have P2P communication without no single point of failure, but then it requires that all RMBs need to have
public
IPs in a sense that all remote RMBs need to be reachable from all other RMB instances. Hence the yggdrasil overlay network was used.As a concept, RMB is fine, but the problem is we rely mainly on a 3rd party overlay network ygg to actually establish the communication. The problem is yggdrasil proved unreliable and randomly introduces downtime and huge latency.
Alternate design
It's obvious without having a public IP for each single entity on the network, a real P2P protocol won't be possible. Hence we have to go back and rely on NATting. In other words instead of waiting for messaging an entity need to initialize and maintain a connection to "chat" or "proxy" service that acts like a central hub for messages. Think telegram or matrix.
The "central" in the name doesn't mean there is a single instance, we hope with proper design we can have a service that can scale both horizontally and vertically.
Suggesting
#1
redis streams
to queue and deliver messages. The idea goes like this:10000
message in case client is dead and never coming back (value can be changed later)europe
region can geteurope.grid.tf
domain.europe.grid.tf
but then the domain becomes part of the user id<ID>:eruope.grid.tf
. When a europe client wants to send a message to another twin in euope the server will do routing to the right queue locallyGE
can have their own proxy server running sayproxy.greenedge.com
and that is configured as the proxy for that farm. Means that all nodes in this farm will connection to proxy.greenedge.com hence the full address for each node 123 (in this farm) is123:proxy.greenedge.com
.666:europe.grid.tf
for example can send a message to 123 by sending the message to MY proxyeurope.grid.tf
over the open web-socket. then the proxy will federate the message to proxy.greenedge.com, which will hold the message and deliver when possible to 123. Return messages takes the same path.Beta Was this translation helpful? Give feedback.
All reactions