Hi @lucfranken
I said the number of messages consumed will be the same for those cases. However there are certain things that will give huge impact on performance in some scenarios. Will explain below.
Webshop with products: No real advantage
Partially true, because we added a “shared publication” principle which works at instance level. What it does is if you return a cursor or array of cursors, it takes the filters and selectors from those curors (and does a JSON.stringify) and makes a “key”.
What this means:
If you have 1 instance and 100 people are on the products list. On page 1, we have 1 single redis listener and 1 single processor which dispatches “added”/“changed”/“removed” to all observers (clients). If they are on page 2, like different limit/skip, they won’t share the same processor. The overhead for this is very small, just a search done once when subscribing, and when it stops, just a check to see there are no other observers so it can destroy. Sharing is done per publication name.
Also last night I woke up at 4 AM with another idea for large-scale, sharing redis “listeners” at instance level: Created an issue for this here
However, if you have a big shop, and you have let’s say 100 instances, chances of people viewing the same thing on the same instance are small. This is why in the future I will be seriously thinking of caching the state into redis: Created an issue for this here
These 2 will be critical. The problem is man, I don’t really care about large-scale that much, most projects won’t reach it, or they may not be designed for that, but even for a small project, instead of having 20 instances to handle 1000 online people, you would reduce it to 1 server with 8 cores 16gb ram, and use pm2 or something
Forum topic list: No real advantage
Same advantage as above.
Chat: Lots of advantage because more specific listening to only relevant changes
True
Apps, like New audio demo reel service built with Meteor: ReelCrafter , huge advantage because only listening to changes on the data for the specific user?
True, but not only that kind
Which means you could create a new namespace in every collection for every account. So instead of searching constantly through all tracks you now just load the namespace for your account.
Yes yes, the idea for that was to enable multi-tenancy, but ofcourse it can have other applicability as well. If you boot-up an invoice app, where you can have multiple teams, those teams live in isolation to each other, therefor, when performing mutations you specify their namespace, so listeners will be hitted only with relevant data. You could create an additional abstraction layer to do this automatically for you, so you won’t have to do it on every insert/update/remove you could even override how the package works I will have to think of some ways to make it super-hackable so anyone could do anything they want with it.
As you can see moving away from oplog, to something customizable, opens the gateway to new technologies and ability to fine-tune the reactivity however you wish. If you trully want something large-scale ~50,000 online people, you would use only ‘channel’ publications, and implement custom publishers to redis to achieve that. Things will definitely be different.