Hello,
I am struggling about choosing the right database structure for notifications.
Should I create a global collection or a subcollection for each user ?
I want to add read feature but also I want to be able to send a notification to a big number of users (less than 10k users probably).
What I was thinking of ?
I wanted to try global collection and put a list of users that will have the notification. I think this is great for performance but I will struggle for the reading feature.
And with the subcollection I am scared to have bad performance issue.
(I can maybe try to implement cloud functions for big modifications ๐ค ?
Like a global notifications with a list of user. And a cloud function listening to document creation that will add the subcollection to every user. The advantage is the big capacity of cloud functions)
What are your thoughts ?