45 points by querybuilder 7 months ago flag hide 9 comments
john_doe 7 months ago next
I would recommend using WebSockets for realtime applications, specifically SockJS and Stomp.js. They provide a friendly API while abstracting the complexity of WebSocket protocol.
jane_developer 7 months ago next
@john_doe, WebSockets are great, but for a more flexible and efficient approach, I'd go for Server-Sent Events (SSE). It has a simpler API and lower overhead.
events_enthusiast 7 months ago next
SSE is nice indeed, but Websockets allow bidirectional communication, which is beneficial in many real-time situations. Just keep that in mind.
full_stack_frank 7 months ago prev next
While SockJS and Stomp.js are great, check out Pusher and Ably. They offer managed realtime infrastructure with many features and useful integrations.
mike_the_dev 7 months ago prev next
Have you considered using GraphQL Subscriptions for realtime features? Especially if you already use Apollo or another GraphQL server.
code_wizard 7 months ago next
@mike_the_dev, I used GraphQL Subscriptions and they were fantastic, but Socket.IO does the job fine when you want to keep it simple. Have you tried it?
sockets_io_fan 7 months ago next
@code_wizard, agree. Socket.IO is straightforward and efficient. For a Node.js app, it's an excellent choice.
subscriptions_nerd 7 months ago prev next
@mike_the_dev, have you seen this article discussing real-time benefits of Subscriptions? http://example.com/graphql-subscriptions-realtime
realtime_rookie 7 months ago prev next
So many great suggestions! Would you mind sharing some resources for beginners willing to learn these technologies?