Introduction to AWS Websockets

Websockets are key to polished async processes. Discover how to start with push notifications in AWS

Allen Helton
Better Programming

--

Photo by Jason Leung on Unsplash

You know that feeling when you go to a social media site, you publish something exciting, and sit there waiting for notifications to roll in as people like and comment on your post?

It’s the best.

It gives you immediate satisfaction over and over again. It sends little shots of dopamine through your system. It’s literally addicting.

And it’s all possible because of WebSockets.

What is a WebSocket?

At its simplest, a WebSocket is a direct line of communication between a client and server. Let’s use Twitter as our social media use case. A WebSocket connection is a two-way communication between the mobile app (or website) and the Twitter servers.

When somebody likes your post or retweets you, you want to be informed right then and there. So the servers use the direct line it has with you to push a notification to your phone. You get to know what happened as soon as it is happening.

Are they necessary? Technically no. But do they enhance the user experience and bring delight to your consumers? Absolutely.

--

--

Responses (2)

What are your thoughts?