Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera115854yYou cannot really build something like that without real understanding.
But start by looking into node.js event loop and how to avoid locking the server.
Then, when you say scale, are we talking a few hundreds or several thousand clients?
Once you go up in scale you need much more insight into the actual application since that is the deciding fact on which solution works.
Judging by your very unspecific questions I guess you either are underestimating the complexity or overestimating the scale you need.
The kind of scalable design you mention can be very easy up to a point and then turn into a real nightmare.
So what kind of scale are we talking about, what is this score you need to keep track of and what type of traceability and security is required? -
Start with this:
How many data points you are tracking?
how many clients will be tracking in total? avg users in real time? peak users in real time?
What is the acceptable time frame between event ingest, to client ack on new event arrived? -
So I asking this question half cooked in architecture discussions.
first of all score was a typo I meant *socket*
Second, here is the data flow.
Users come on our web app, frontend makes a socket connection and uses usersIds to register it to several events frontend is looking for
Say user joins a big 1000 user group chat, all 100 users have now subscribed to a event to receive messages on that group chat via socket.
Now currently the system my old team has designed if one user sends a message the system searches Redis for all the user Ids subscribed to the event of this group chat and publishes the messages and they receive it, how can we solve this to a more scalable solution
I am looking into insights and docs and user studies of using node, redis and socket to make a scalable real time pub sub architecture -
Voxera115854y@logikjunkie I would say redis is quite good for the pub-sub handling but if you feel its to slow you most likely need some tree structure with edge servers that handle a group of users and a small set or single root server that passes messages between edge servers.
But by this scale your also used n the real of custom design and no one size fits all so you really must try to find your bottlenecks
Try to fix find similar services and check if they have blogged about how they solved it.
Question:
Can someone share resources or insights into system design or system architecture for a real time web app using nodeJS and scores in backend and react in front end
I was options to maintain and scale real time events
Basically a solid scalable architecture for a pub-sub kind of model
question