The push to develop realtime web apps has been a fun one, and we’ve seen some awesome products come out of it. Websockets as a technology are great. And there are a ton of tools that let you prototype impressive realtime apps in a flash. Unfortunately, these come with their own host of problems. Stateful socket connections can be messy, and as you build an app with the intention of scaling sometimes realtime just doesn’t quite fit. It can create more problems than it solves as you begin hitting edge cases or need to build a system without as much tight coupling. You thought you had a magic bullet solution, but you need something a little bit different. Where do you turn?

The architectural pattern we have for building scalable web applications is time-tested and clear. Distributed, stateless API services that allow any web, mobile or IoT app to interface with a protected data layer — in many cases, just a database. As web projects grow in size and the number of clients that consume your API data increase (tablets, watches, TVs, you name it) it’s becoming increasingly important to look at web development through the lens of service-oriented architecture for every layer — and begin pulling your API logic apart from your client-side presentation completely.