Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're very confrontational yet your post doesn't really refuse the author's main points.

What the author means with "transactional" is that WebSockets have no built-in request-response mechanism, where you can tell which response belongs to which request. It's a weird word choice, but alas.

I do agree that the bit about "handshakes are hard" feels a bit ill-advised btw, but it's not the core argument nor the core idea of this post. The core idea is "do request-response via HTTP, and then use some sort of single-direction stream (maybe over WS, doesn't matter) to keep client state in sync". This is a pretty good idea regardless of how well or how badly you know the WebSocket RFCs by heart.

(I say this as someone who built a request-response protocol on top of websockets and finds it to work pretty well)



> What the author means with "transactional" is that WebSockets have no built-in request-response mechanism

Its not HTTP and does not want to be HTTP. In WebSockets the request/response mechanism is for one side to send a message and then the other side to send a message. If you want to associate a message from one side with a message from the other side put a unique identifier in the messages.

If you really want the request/response round trip then don't use WebSockets. I would rather messages just transmit as each side is ready, completely irrespective of any round trip or response, because then everything is fully event oriented and free from directionality.


> If you really want the request/response round trip then don't use WebSockets.

Yes! That's the whole point of the article! You agree with the author!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: