From building a chat room to expose a fully-featured event store, Mercure covers a broad spectrum of use cases related to realtime and async APIs.
- How Raven Controls is using Mercure to power major events such as Cop 21 and Euro 2020
- Pushing 8 million of Mercure notifications per day to run mail.tm
- 100,000 simultaneous Mercure users to power iGraal
Example of usage: the Mercure integration in API Platform:
Here are some popular use cases:
- a webapp retrieves the availability status of a product from a REST API and displays it: only one is still available
- 3 minutes later, the last product is bought by another customer
- the webapp's view instantly shows that this product isn't available anymore
- a webapp tells the server to compute a report, this task is costly and will take some time to complete
- the server delegates the computation of the report to an asynchronous worker (using message queue), and closes the connection with the webapp
- the worker sends the report to the webapp when it is computed
- a webapp allows several users to edit the same document concurrently
- changes made are immediately broadcasted to all connected users
Mercure gets you covered!
See also, the examples.