Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
21–30 of 41 posts
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#22One problem I have with using postgres listen/notify as a general purpose message queue is that it requires polling (At least that was the case when I last looked at it). Of course you can use a blocking wrapper around the polling code but it still causes unnecessary roundtrips.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#23Earlier quoted context omitted.
but has this design been implemented to effectively handle something close to a million users Obviously not. Some of his numbers are off by an order of magnitude. E.g. he claims "10 million messages/sec" for a single redis instance. In reality redis tops out at well under one million messages/sec; http://redis.io/topics/benchmarks The design is almost comically bad (single source of truth for a "scalable" chat app?!)…
I agree. "Number of messages a single Node broker can handle: ~10k per second without JSON stringification memoization, ~100k per second with JSON stringification memoization (Nexus Flux socket.io does that for you)." <- Can't be possible. The numbers should be lower with JSON stringification/parsing instead of being 10x.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#24One problem I have with using postgres listen/notify as a general purpose message queue is that it requires polling (At least that was the case when I last looked at it). Of course you can use a blocking wrapper around the polling code but it still causes unnecessary roundtrips.
Once that FD is active, you call the poll() method and your notify payload becomes available to you.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#25One problem I have with using postgres listen/notify as a general purpose message queue is that it requires polling (At least that was the case when I last looked at it). Of course you can use a blocking wrapper around the polling code but it still causes unnecessary roundtrips.
Huh? The entire point of listen/notify is exactly that you don't have to poll.
It's still not a particularly simple interface as you have to check for notifications after every single SQL command if I understand it correctly.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#26One problem I have with using postgres listen/notify as a general purpose message queue is that it requires polling (At least that was the case when I last looked at it). Of course you can use a blocking wrapper around the polling code but it still causes unnecessary roundtrips.
Your database connection is just a socket, so you can add that file descriptor to the set of file descriptors you are waiting IO on, if you are using a classic select/poll based system. See an example in the pscyopg2 docs here: http://initd.org/psycopg/docs/advanced.html#asynchronous-not... Once that FD is active, you call the poll() method and your notify payload becomes available to you.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#27Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#28GameRanger has six million users, tens of thousands to hundreds of thousands of whom will be active simultaneously. His chat problem involved has moderate fan-out. Scott Kevill does it on a single machine (last time I checked) with hand-rolled C++ and close attention to the details of how the Linux networking stack works.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#29GameRanger has six million users, tens of thousands to hundreds of thousands of whom will be active simultaneously. His chat problem involved has moderate fan-out. Scott Kevill does it on a single machine (last time I checked) with hand-rolled C++ and close attention to the details of how the Linux networking stack works.
Re: Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
#30* Stores contain Observables
* Components (or Views) contain Observers
* Actions are Proxies
So the article is basically saying the Observer pattern is scalable, but uses the buzz-phrase "Full Stack Flux" instead. To make it even worse it is only a theoretical application of this pattern.