Getting Your Feet Wet with Web Sockets Using Talk


While working through the freeCodeCamp curriculum, I had to complete a project using web sockets. For that project, I built an application where you could search for a stock ticker symbol and it would chart the last 100 days of activity on the stock market. It used websockets to update any clients that might be listening for changes on the server. You can see that project, here.

I chose to use to complete that project and found it simple and enjoyable to work with. I put together this talk to give at the BellevueJS meetup group in September 2017 to show attendees how easy it was to get started with web sockets.

Talk Overview

In the talk I quickly described what web sockets are and that they can help us to proactively update the client when the server receives new updated information. In the traditional HTTP request paradigm, if one user does something and POSTs some data to the server, a second user wouldn't see that change until they refreshed the browser so that their client would make a new GET request to the server. Websockets allow the server to push changes to any client that might be 'listening' without those clients have to make a GET request.

A really good example that a lot of people are familiar with is Trello. If you open up to client instances of the same Trello board and add a card on one, the other client will update without any additional request to the server.

After giving a good example of websockets in action, we walked through the tutorial that the website provides to quickly get started with web sockets. We walked through how to make a chat application with Then, I demonstrated the stock market ticker app that I referenced above.

Talk Download

You can watch the recording of the talk here:

If you want to take a look at the slides, you can download them here.