Search code examples
crossbarwamp-protocol

Where is the crossbar subscription / state store?


When subscriptions are created and maintained by crossbar where are they stored? I did a quick look through the source code and think they are all stored in local process memory. Is that right? What is the horizontal scale out model if stuff is stored in memory? Are connections expected to be stuck to a given node? What if the connection breaks and is restablished or if a server node goes offline? Do those connections loose all the state (subscription information)?


Solution

  • The scale-out model which Crossbar.io will implement (upcoming in 2015) is described here. On a Crossbar.io node, subscription state is transiently stored in process memory (of each router process), and synchronized across router processes. A given client is always connected to a single node. When it looses it's connection, it's subscriptions are gone. When a node goes down, the client will automatically reconnect - to another node in a cluster. The client will need to reestablish it's subscriptions at the new node. Two clients connected to two different nodes (and the same realm), where the nodes are both part of one cluster will transparently communicate.