WebSockets vs. Webhooks
I knew some about Webhooks, but confused them with WebSockets, when they’re really not very similar at all.
Webhooks can send an to an app when a given event happens. One example is a Slack bot that I set up using a GitHub Webhook, which notifies my team’s channel when a build fails. It’s a one-time notification.
WebSockets are a bidirectional, persistent communication channel. Popular use cases include chat, or online games.
I learned about WebSockets because I was trying to participate in the Web Dev Challenge Hackathon by CodeTV. I wasn’t able to get my submission done in time, but this knowledge still came in handy when the next challenge came around. Here’s my submission for that one, which uses WebSockets.