Develop.Cheap

It's time to get real(time)

Hamilton, Bermuda

I’m trying to cover some areas which aren’t so specific to web development, or at least not entirely the front-end aspects of it. Hope you find something interesting here, and as always, please get in touch if you have any thoughts or ideas for future issues.

Back in the early days of my web career (think AltaVista era), I enjoyed the web’s ability to reach people easily, but I often felt limited by the ability to only deal with a single request at a time. I longed to be able to make something “multiplayer”. A big part of that was also being able to send something to the user without the client initiating it.

There were certainly some different approaches to this problem through the years, many of which fall under the umbrella term of “Comet”. Most involved some sort of long tail polling. So when proper WebSockets were introduced, I was understandably excited.

All of these technologies coalesced into a part of the industry known as the real time web. With new APIs around push messages and notifications and other similar concepts, this is an area where exciting new things can be done.

In the past I’ve written my own WebSocket-based services in Node.js to facilitate online games I wrote, but they were often fiddly to work with. More recently I’ve written apps using third party real time services, and found that to be a generally nicer experience.

Worth noting that there is more to “real time” than WebSockets, but that is what I’m focusing on here. Also, for the .NET folks, Microsoft’s offering in this space is known as SignalR. There is a free Azure SignalR tier available if you are already invested in that ecosystem. And I guess AWS Lambda WebSockets are possible now as well, although it still looks like the developer experience is sub par.

Ably logo or screenshot

Ably

I hadn’t heard of Ably until earlier this year. They were a bit later to this game than some of the others. However, their offering looks very impressive and they feel a bit more enterprise than some of the others. Their free tier seems very adequate and they host a number of comparisons to their competitors showing why they are clearly superior, in their eyes.

https://www.ably.io/

Pusher Channels logo or screenshot

Pusher Channels

Pusher is possibly the most well known in this space, and they have branched out into other areas like push notifications and in-app chat support. However their Channels product has a Sandbox plan which is quite generous. A free tier standard 100 concurrent connections, but with unlimited channels and 200K daily messages, this plan should give you what you need for your app, at least initially.

https://pusher.com/channels

Scaledrone logo or screenshot

Scaledrone

As far as their free tier goes, Scaledrone doesn’t offer quite as much as the others do, but since it is the only service I’ve used personally, I wanted to include it. Their pricing does scale up a bit better than some, allowing for more fine grained growth and lower prices at the high end.

https://www.scaledrone.com/

Realtime Framework logo or screenshot

Realtime Framework

I don’t know much about Realtime Framework other than they seem to be the most generous with their free tier message allowance, providing 25 million. They also have a decent source of SDKs available for integrating into your language of choice. If you plan to use something other than JavaScript to create your publisher or subscriber, you may want to check on support for your language or run time.

https://framework.realtime.co/messaging/index.html

If you plan to integrate with one of these providers, I would recommend creating a basic wrapper around their libraries in case you find your choice isn’t giving you what you need.

Written by Colin Bate