1,488 karma · joined October 25, 2012
It makes sense for a subset of applications that require connectivity but many apps or tools should be able to work offline or without a constant connection.
I really hate the endless short videos of youtube, instagram, and tiktok. I have no tiktok but they've essentially recreated the same crap on youtube.
The experience of YouTube has been pretty much completely ruined for me. The content of videos seems to have gone way down too. I think this may have coincided with the change in monetization strategy. Seems like the quality of recommendations has gone WAYYY down since then.
haven't committed to using one particular technology. queues that support retries could be useful in the event that a disconnect happens messages wouldn't be necessarily lost. Something custom built on top of Redis could accomplish the same perhaps.
race conditions during migrations are the biggest concern.... You do not want a client with a connection to server they will never receive a message on.
I want the connections to be distributed to separate instances of a WS server based on modulo-based or consistent hashing algorithm... above that in the stack we have a message broker or queue partitioned using the same sharding algorithm for the number of websocket servers running. This queue/message broker sends publishes messages to each web socket service which in-turn pushes the message to the client. This is how I want to handle horizontally scalable web socket connections...
The question I have is the best way to do this and the best way to migrate connections. From one service to another when/if the replication factor of web socket servers changes (we add/remove servers)...
One way I would think would be to send a disconnect message to the websocket service when this event happens and it would disconnect it's clients and then have a random delay for when re-connection happens... so as to avoid trying to reinitialize all of those connections at once. This seems sub-optimal as with consistent-hashing many of the connections will stay on the same server, and terminating those connections would be unnecessary.
What is the best way to migrate an open TCP from one server to another? Or if the connection must be closed... how can we minimize the number of connections that are to be closed.
BTW: I know I can broadcasts to all instances of the websocket server, and then unless that server holds the connection it is no-op... if the server does have a connection then send the message back... This also seems it would have a limit to how far this scaling-strategy would grow before running into limitations.
Also... One of the things I didn't like about ES was the JSON DSL. It would be nice to create a friendlier query language, maybe something like SQL to query data. I find ES queries written to be ugly to look at, and not intuitive.
Their adopted child has claimed child abuse. And the lead singer has been accused by multiple women of abuse. Of course they are innocent of a crime until proven guilty of these charges. But it seems to be odd timing to release a new music video.
(if .. do ..)
(macroexpand '(when 1 2 3 4)) (if 1 (do 2 3 4))
but that is not what it seems to do in PM-Lisp take the example of `=` definition:
(def = (and (when A B) (when B A)))
If this were the same functionality clojure it would be testing the truthyness of the evaluation of each when expression
so If I had (and (when 3 5) (when 5 3)) it would evaluate to (and 5 3) which would evaluate to 3 which is truthy.
So that got me stuck in the article. But it seems that when is more like a test/assertion... (when x z) saying for all values of x ... z is implied (i.e. the same way one mathematical rule implies another).
I'm going to reread this article and try to understand better.