_Full code at _https://github.com/OpenSocket/socketcluster-client-ruby

I always had interest in real-time frameworks and working with chat based applications. I was searching for available frameworks that can be used for building chat based applications. There were lots of available options like Pubnub, Pusher, Firebase, socket.io and socketcluster.

The problem with cloud based services like Pubnub, Pusher and Firebase is limitation on writing custom logic on the backend side and ultimately pricing. The socket.io seem to have larger developer community, quite good in terms of setting up environment and flexible API architecture. Still, I needed something more than this; a framework that is easy to scale and can handle millions of concurrent connections. Finally , I found a socketclusterframework as best solution which is powered by fastest available WebSocket engine uwebsockets.

SocketCluster is an open source real-time framework for Node.js. It supports both direct client-server communication and group communication via pub/sub channels. It is designed to easily scale to any number of processes/hosts and is ideal for building chat systems. SocketCluster was designed to make the process of building scalable real-time systems simpler.

SocketCluster is a fast, highly scalable HTTP and WebSockets server environment which lets you build multi-process real-time systems that make use of all CPU cores on a machine/instance. It removes the limitations of having to run your Node server as a single process and makes your backend resilient by automatically recovering from worker crashes.

SocketCluster works like a pub/sub system which extends all the way to the browser/IoT device — It only delivers particular events to clients who actually need them. SocketCluster is designed to scale both vertically (as a cluster of processes) and horizontally (multiple machines/instances).

#socketcluster #ruby

An Introduction to socketcluster.io and Ruby Client
1.95 GEEK