Sockets are the high power pipeline of the realtime web and in this article we’ll show how a minimal amount of code can bring database data to life in a web browser.
With the rise of bots and the chat based tools such as Slack and Messenger, users today have come to expect much more immediate interactions from their applications. One of the tools that most front end developers should have in their toolbox today is socket based communication. With a socket based solution it is easy to deliver realtime updating like leaderboards, stock quotes, tweets or any other streaming style of data to both mobile and web applications.
Here we will look at using just such a set of tools with NodeJS and Socket.io on both the server and in the browser. And we will complement them with a Redis PubSub implementation to model interacting with backend services and Smoothie.js to finish off the front end with a visualization. We’ll use tweets as an example but it is easy to substitute any kind of realtime data you may have available.