All Projects → symfony → Mercure

symfony / Mercure

Licence: mit
The Mercure Component allows to easily push updates to web browsers and other HTTP clients using the Mercure protocol.

Projects that are alternatives of or similar to Mercure

Mercure Bundle
The MercureBundle allows to easily push updates to web browsers and other HTTP clients in the Symfony full-stack framework, using the Mercure protocol.
Stars: ✭ 195 (-27.78%)
Mutual labels:  subscriptions, symfony, server-sent-events
Mercure
Server-sent live updates: protocol and reference implementation
Stars: ✭ 2,608 (+865.93%)
Mutual labels:  subscriptions, server-sent-events
cqrs-event-sourcing-example
Example of a list-making Web API using CQRS, Event Sourcing and DDD.
Stars: ✭ 28 (-89.63%)
Mutual labels:  server-sent-events
Doctrinecachebundle
Symfony2 Bundle for Doctrine Cache
Stars: ✭ 2,813 (+941.85%)
Mutual labels:  symfony
nami-apple
Easy Apple subscriptions & in-app purchases, powered by on-device machine learning to grow your revenue. The smartest way to sell subscriptions.
Stars: ✭ 34 (-87.41%)
Mutual labels:  subscriptions
go-gin-web-server
Deploy Go Gin on Render
Stars: ✭ 23 (-91.48%)
Mutual labels:  server-sent-events
http-event-stream
📡 Modern spec-compliant Server Sent Events stream implementation.
Stars: ✭ 16 (-94.07%)
Mutual labels:  server-sent-events
okhttp-eventsource
Server-sent events (SSE) client implementation for Java, based on OkHttp: http://javadoc.io/doc/com.launchdarkly/okhttp-eventsource
Stars: ✭ 70 (-74.07%)
Mutual labels:  server-sent-events
Sandbox
Sonata Project's sandbox
Stars: ✭ 266 (-1.48%)
Mutual labels:  symfony
mediafeed
Web application to help categorize and aggregate subscriptions of media channels for easy access. (working only with Youtube channels at this moment)
Stars: ✭ 15 (-94.44%)
Mutual labels:  subscriptions
Cors
🔮Supported(Laravel/Lumen/PSR-15/Swoft/Slim/ThinkPHP) - PHP CORS (Cross-origin resource sharing) middleware.
Stars: ✭ 266 (-1.48%)
Mutual labels:  symfony
go-sse
Server-Sent Events for Go
Stars: ✭ 106 (-60.74%)
Mutual labels:  server-sent-events
Stage.js
Stage.js - Single-Page Web Application front-end framework
Stars: ✭ 13 (-95.19%)
Mutual labels:  server-sent-events
Twig Pack
A Symfony pack for Twig
Stars: ✭ 255 (-5.56%)
Mutual labels:  symfony
ruby-eventsource
Server-sent events (SSE) client implementation for Ruby
Stars: ✭ 19 (-92.96%)
Mutual labels:  server-sent-events
Pushpin
Proxy server for adding push to your API
Stars: ✭ 3,050 (+1029.63%)
Mutual labels:  server-sent-events
token-subscription
💰🕰️📋[EIP 1337 POC] Recurring subscriptions on the Ethereum blockchain powered by meta transactions.
Stars: ✭ 73 (-72.96%)
Mutual labels:  subscriptions
node-mercure
📳 Mercure Hub & Publisher implemented in node.js.
Stars: ✭ 27 (-90%)
Mutual labels:  server-sent-events
sseclient
Pure-Python Server Side Events (SSE) client
Stars: ✭ 85 (-68.52%)
Mutual labels:  server-sent-events
Dunglasactionbundle
Symfony controllers, redesigned
Stars: ✭ 269 (-0.37%)
Mutual labels:  symfony

Mercure Component

Mercure is a 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.

The Mercure Component implements the "publisher" part of the Mercure Protocol.

Getting Started

$ composer require symfony/mercure
// change these values accordingly to your hub installation
define('HUB_URL', 'https://demo.mercure.rocks/.well-known/mercure');
define('JWT', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJmb28iLCJiYXIiXSwicHVibGlzaCI6WyJmb28iXX19.LRLvirgONK13JgacQ_VbcjySbVhkSmHy3IznH3tA9PM');

use Symfony\Component\Mercure\Hub;
use Symfony\Component\Mercure\Publisher;
use Symfony\Component\Mercure\Jwt\StaticTokenProvider;
use Symfony\Component\Mercure\Update;

$hub = new Hub(HUB_URL, new StaticTokenProvider(JWT));
$publisher = new Publisher($hub);
// Serialize the update, and dispatch it to the hub, that will broadcast it to the clients
$id = $publisher->publish(new Update('https://example.com/books/1.jsonld', 'Hi from Symfony!'));

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].