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 that rely on it.

Mercure is especially useful for adding 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 library or SDK required (built on top of HTTP and server-sent events)

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

  • Built-in connection re-establishment and state reconciliation

  • JWT-based authorization mechanism (securely dispatch updates to selected subscribers)

  • High performance, 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