Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, FrankenPHP, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu

Symfony and API Platform get “push” and real-time capabilities (Mercure protocol)

Posted on March 1, 2019March 2, 2019 by Kévin Dunglas
Official "push" and real-time capabilities for Symfony and API Platform (Mercure protocol) from Les-Tilleuls.coop

Mercure.rocks is a brand new protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and battery-efficient way. It is especially useful to publish real-time updates of resources served through web APIs, to reactive web and mobile apps.

Both Symfony and API Platform now have an official support for this protocol!

From the ground, Mercure has been designed to work with technologies not able to maintain persistent connections. It’s especially relevant in serverless environments, but is also convenient when using PHP or FastCGI scripts.

Mercure is basically a higher-level replacement for WebSocket. Unlike WebSocket, it is compatible with HTTP/2 and HTTP/3.
It has been designed with hypermedia APIs in mind, is auto-discoverable through the Web Linking RFC and is also compatible with GraphQL.
It natively supports authorization, reconnection in case of network issue (with refetching of missed events), subscribing to several topics, topics patterns (using templated URIs)…

Because it is built on top of Server-sent Events and plain old HTTP requests, it is already compatible with all modern browsers, and requires 0 client-side dependencies.

The protocol is open (available as an Internet Draft), and a reference open source implementation of the server written in Go is available.—

Related posts:

  1. HTTP/2: speed up your apps and dispatch real time updates (Symfony and API Platform’s features announcement)
  2. API Platform 2.4: MongoDB, Elasticsearch, Mercure, OpenAPI v3, CQRS with Symfony Messenger, HTTP/2 Push, improved React apps and more!
  3. Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and Panther (SymfonyCon)
  4. Mercure: Real-Time APIs for Serverless and Beyond

1 thought on “Symfony and API Platform get “push” and real-time capabilities (Mercure protocol)”

  1. Pingback: A Week of Symfony #635 (25 February - 3 March 2019) (Symfony Blog)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Social

  • Bluesky
  • GitHub
  • LinkedIn
  • Mastodon
  • X
  • YouTube

Links

  • API Platform
  • FrankenPHP
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks

Tags

Apache API API Platform Buzz Caddy Docker Doctrine FrankenPHP Go Google GraphQL HTTP/2 Hydra hypermedia Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Mercure.rocks MySQL performance PHP Punk Rock Python React REST Rock'n'Roll RSS Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu webperf Wordpress XHTML XML

Archives

Categories

  • DevOps (86)
    • Ubuntu (68)
  • Go (21)
  • JavaScript (46)
  • Mercure (7)
  • Opinions (91)
  • PHP (178)
    • API Platform (80)
    • FrankenPHP (16)
    • Laravel (1)
    • Symfony (98)
    • Wordpress (6)
  • Python (14)
  • Security (15)
  • SEO (25)
  • Talks (47)
© 2026 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme