Mercure.rocksSponsored by Les-Tilleuls.coop
Contribute!

Mercure in a Few Words

Mercure is an open solution for real-time communications designed to be fast, reliable and battery-efficient. It is a modern and convenient replacement for both the Websocket API and the higher-level libraries and services relying on it.

Mercure is especially useful to add streaming and asynchronous capabilities to REST and GraphQL APIs. Because it is a thin layer on top of HTTP and SSE, Mercure is natively supported by modern web browsers, mobile applications and IoT devices.

A free (as in beer, and as in speech) reference server, a commercial High Availability version and a hosted service are available.

Subscriptions Schema

The Protocol

  • native browser support, no lib nor SDK required (built on top of HTTP and server-sent events)

  • compatible with all existing servers, even those who don't support persistent connections (serverless architecture, PHP, FastCGI...)

  • built-in connection re-establishment and state reconciliation

  • JWT-based authorization mechanism (securely dispatch an update to some selected subscribers)

  • performant, leverages HTTP multiplexing

  • designed with hypermedia in mind, also supports GraphQL

  • auto-discoverable through web linking

  • message encryption support

  • can work with old browsers (IE7+) using an EventSource polyfill

  • connection-less push in controlled environments (e.g. browsers on mobile handsets tied to specific carriers)

Read the specification

The Hub

Get your hub