I'm thinking about how to integrate mercure into a large marketplace app.
Imagine it does have plenty of Stores, with plenty of Products.
I'm a Customer and I have added 50 Products in my cart, from various Stores.
I want to know when any of these Products has it price changed by the store owner.
Wouldn't be inefficient and slow to have 50 EventSources (one for each product) ?
I could subscribe on /products but then, if I have more than 50k products which are constantly modified by store owners, wouldn't it be a waste of data exchanges (and perfs on client side to analyse 50k editions to know if Customer is concerned) ?
Wouldn't it be great for my user to send his own payload to subscribe to a batch of products. And just close and reopen an EventSource when he adds a product to his cart (to add it in payload) ?
The only way I see to make this work is to send a request to my server with these subscriptions urls, which would return a specific token to be used as mercureToken.
Is this the way to do or is there something already developed for such case ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi!
I'm thinking about how to integrate mercure into a large marketplace app.
Imagine it does have plenty of
Stores
, with plenty ofProducts
. I'm aCustomer
and I have added 50Products
in my cart, from variousStores
.I want to know when any of these
Products
has it price changed by the store owner.Wouldn't be inefficient and slow to have 50 EventSources (one for each product) ?
I could subscribe on /products but then, if I have more than 50k products which are constantly modified by store owners, wouldn't it be a waste of data exchanges (and perfs on client side to analyse 50k editions to know if
Customer
is concerned) ?Wouldn't it be great for my user to send his own payload to subscribe to a batch of products. And just close and reopen an EventSource when he adds a product to his cart (to add it in payload) ?
The only way I see to make this work is to send a request to my server with these subscriptions urls, which would return a specific token to be used as mercureToken.
Is this the way to do or is there something already developed for such case ?
Thank you