Introduction to Websockets and Firebase – How to Build Real-Time Apps



Introduction to Websockets and Firebase – How to Build Real-Time Apps

Introduction to Websockets and Firebase - How to Build Real-Time Apps

When you’re first starting out with web development, you don’t tend to think about state very much. Because HTTP is a stateless protocol. However there’s a litany of applications that require a persistent two-way communication channel between the client and server so they can constantly send data back and forth to each other, and also so the server can broadcast data to all connected clients at once.

Enter Websockets. Websockets are a native feature of all modern browsers, but they kind of suck to deal with. They’re really low level, and each browser implements them in slightly different ways. So if you want to build a real-time app you have some challenges ahead of you.

Fortunately, there is a super-simple way to get started with websockets, by using an incredible service called Firebase. Firebase was a startup that launched in 2012, and then acquired by Google in 2014. Firebase as a service does a lot of different things, but if there’s one thing that you need to know about it, it’s that Firebase is the dead-simplest way to build a real-time app that has shared state across multiple devices.

Comments are closed.