DEV Community

Discussion on: What do you use to create REST APIs with WebSockets?

Collapse
 
jackmichaud profile image
Jack Michaud

I tended to err away from WebSockets until I tried making a socket server with AWS API Gateways.

A high level overview: a WebSocket connection triggers a lambda where you log a connection ID into a database. The connection ID can be used to send data back to that connection through other lambdas. The disconnecting the WebSocket triggers another lambda where you can remove the connection ID. aws.amazon.com/blogs/compute/annou...

I like this solution because it's highly scalable and fits into my work's infrastructure well. I know AWS isn't for everyone!