Connecting deepstream nodes directly

208 Views Asked by At

Deepstream docs:

For smaller clusters it used to be possible to connect deepstream nodes directly in a full-mesh configuration (everyone-to-everyone). This feature has been deprecated in its current incarnation, but will soon be replaced by a more scalable (and hopefully slightly smarter) direct-message-connector plugin based on the Small World Network Paradigm.

Is it possible to create the described (but deprecated) mesh with a deepstream cluster? I wasn't able to find any real example of this.

An example thought is a Chat Application. This application would run on each users desktop and each establish a deepstream server. There would be some discovery logic to connect to other instances on the same LAN. The clients would sync data across each other through their own ds servers running on their desktop.

I know IPFS has this sort of thought, but wanted this to be more application-based and deepstream seemed like a good place to start.

Edit:

I did just find this: https://deepstreamhub.com/tutorials/protocols/webrtc-full-mesh/

-- Interested in understanding why this might not be the best scalable solution and if there are possible work arounds

1

There are 1 best solutions below

1
On

Clustering deepstream servers is currently only available as part of our enterprise offering [1]. We've built a decentralized clustering mechanism allowing it to scale to millions of concurrent connections and billions of messages.

If you're looking to build a chat application you wouldn't have a deepstream server running on each persons computer. What you would do is either:

  • set up one deepstream server [2] (we've found that an individual server can easily handle ~100 000 connected clients)
  • create an application on deepstreamHub [3] (deepstreamHub is our hosted version of deepstream where you don't need to run any servers yourself).

Each user of your chat application has a deepstream client that connects to the server. These clients are websocket based and are able to send/receive messages and sync data for your chat application.

Take a look at some of the example apps [4] we've built, these include some chat apps as well as other demos you might find interesting.

deepstream enterprise 1

deepstream open source 2

deepstreamHub 3

example applications 4