Deepstream 5.0: Resurrected using MIT license
deepstream.io
deepstream.io
A non-IP based routing mechanism requires some kind of header/parsing/deserialization of the message being passed. In application level code this is quite slow, you have to query some kind of map synchronized about cluster nodes. This is especially shitty if message addresses are ephemeral, especially per RPC call (which is the default behaviour in most cluster-based RPC frameworks), because then your near cache of the cluster map is never populated. Alternatively you can just broadcast to everyone (skip the cluster map) but then why cluster?
It would be great if we just had IPv6 adoption though. Then you could just uh, route. The DNS based routing in stuff like Kubernetes is close but not for external Internet facing clients. The whole point is to avoid a bastion host.
I am assuming the RPC is happening over WebSockets though.
Generally deepstream is an alternative to using firebase, socket.io, featherJS and meteor. However rather than putting the logic within the server you instead run them as microservices and allow deepstream to handle load-balancing for you.
The two main things deepstream offers are:
- Events
You can publish and subscribe to events by simple doing:
deepstream.event.emit('event-name', data)
deepstream.event.subscribe('event-name', data => {})
Which is the functionality you expect to see from most pubsub mechanisms
- Records
Records is events with persistence. They are more heavy weight objects that persist their content in a cache + db and across all connected devices without the user/developer having to actually do anything. The also support offline support if you want to be able to get/set data while offline.
// get a record
const record = client.record.getRecord('unique-data-name')
// wait for record to be loaded from server
await record.whenReady()
// subscribe to any changes that happen in the future
record.subscribe(data => console.log('someone updated this object!', data)
// discard when finished
record.discard()
You can also set data directly without having to subscribe using
client.record.setData('some-record', newData)
The are multiple other aspects deepstream provides like merge-conflicts, permissions, authentication and some useful patterns, but the above code is about 90% of what you would expect a user to use in deepstream
Also supports persistence of data records (JSON docs) and syncing changes to those docs (competitive to Firebase, etc), backed by Redis.
Works with different protocols (websocket, MQTT, HTTP) and has client libraries for popular languages.
> deepstream is an open source server inspired by concepts behind financial trading technology. It allows clients and backend services to sync data, send messages and make rpcs at very high speed and scale.
https://landscape.cncf.io/category=streaming-messaging&forma...
It's the the 24th streaming & messaging project or product we're tracking.
Buck: https://buck.build/
Presto: http://prestodb.github.io/
The front page of these contain the project name, one-line elevator pitch, long form description, and an automatically playing demo of the product.
Eg. sync
Naive copy sync: 53ms
DeepStream sync: 6ms
The issue with that however is taking that approach means we lose the NodeJS ecosystem support which is massive (and required to add custom plugins/maintain the server). We tried it before and it was terrible in terms of metrics and participation.
Thank you for the feedback though! I will definitely be looking at redesigning the home page and will use your feedback when doing so!
Could you explain what you mean here in greater detail? I'm only talking about changing your marketing copy. I don't understand why you lose the NodeJS ecosystem.
By the way I'd also remove most of the content from the front page. It's too busy. Make every word count.
Basically I'm not certain how to pitch this exactly. I feel a bit of condolence from the fact that when it was a startup with over ten employees we had the same issue (specially since I was the tech guy)
Anyways, more than happy to hear any suggestions! I been involved with this project for over 3 years so I definitely have a biased view on trying to see the project for the first time.
To compare to other frameworks out there:
featherjs: A framework for real-time applications and REST APIs
meteor: THE FASTEST WAY TO BUILD JAVASCRIPT APPS
deepstream: a fast and secure data-sync realtime server for mobile, web & iot
The problem is that once you provide more functionality then pub/sub you end up in this vague toolkit statement land.
I would assume that the issue is more around the fact that the term data synchronization is still not used as often and so doesn't give the same familiar feeling people get when looking at other pub/sub frameworks. Deepstream supports HTTP/MQTT/Binary and JSON websocket protocols for rpcs, records, events and presence. Maybe that should be the sentence!
A secure scalable realtime server that supports HTTP, MQTT and WebSockets for rpcs, data-sync, pubsub and presence functionality
1) https://deepstream.io/tutorials/concepts/what-is-deepstream/ > "What is it for" section
2) and your comment that it's an alternative to firebase, socket.io, meteor.
Perhaps you can think of using these two pieces of information as the front-page blurb rather than make it abstract.
A single sentence in the landing page with a clear description of what it is and what it does would suffice.
Is it possible to make it work in a way that the server only sees encrypted data? I can see it working in a clunky kind of way if each client had two versions of each document, a clear one that is operated on, and one encrypted (possibly a record at a time or something) that is synced.
Ideally you would just configure it using a config file for your permissions (https://deepstream.io/tutorials/core/permission/valve-introd...) and use http auth to authenticate your users (https://deepstream.io/tutorials/core/auth/http-webhook/).
You can see this sort of configuration here https://deepstream.io/guides/live-progress-bar/
If you want you could add a custom plugin that would take the HTTP server within deepstream and enhance it using express for all your non-deepstream routes, if you raise an issue for it I think it's something that can be done in the near future! But generally wouldn't recommend for non-pet projects since they serve two different purposes.
Edit: Also thank you!
> deepstream is an open source server inspired by concepts behind financial trading technology. It allows clients and backend services to sync data, send messages and make rpcs at very high speed and scale.
https://vimeo.com/143728632 was what led to deepstream being initially written a few years back