News for hackers. Stuff that matters.
Re:Websocketd by hendry on Saturday January 26, 2019 @02:28AM (#19005298)
Socket connection alone is too expensive.

IRC shows us that maintaining a reliable socket for most folks is next to impossible.

Re:Websocketd by vidarh on Saturday January 26, 2019 @02:37AM (#19005323)
On the contrary. IRC shows that maintaining a consistent network where every part can always reach every other part is tricky, but the most common problem with irc networks is not clients getting booted off, but net-splits that usually automatically resolves pretty quickly.

That they're visible to clients is an issue with how channels spans servers and how operator status and channel membership is tied to who happens to be on a channel on a specific partition at a certain time, and how messages are propagated when splits resolve, and how inter-server communications happens.

So it has plenty of lessons if you want to build a chat network, but nothing with it suggests maintaining a connection is otherwise a big problem.

In general what it boils down to is the word "reliable": You would want to write your app so that a client that disconnects and reconnects gets a sensible behavior on reconnecting, e.g. by queuing messages when it makes sense, and discard them if it does not, to paper over temporary connection failures.

But you would need to do that if you were to use stateless request/response pairs anyway.

Re:Websocketd by lexicality on Saturday January 26, 2019 @04:28AM (#19005611)
I disagree. I've not seen a netsplit in months, but clients constantly timing out and rejoining is a fact of life.
Re:Websocketd by emj on Saturday January 26, 2019 @06:25AM (#19005855)
That is a different problem, clients can always have bad connections that is not solved by UDP/HTTP.
Re:Websocketd by hendry on Saturday January 26, 2019 @06:44AM (#19005909)
Well http is a short lived request/response.

Sockets need keep alives and resources allocated et al.