Masterclass by les-tilleuls.coop

fren

Les-Tilleuls.coop keeps delivering online training sessions during the Covid-19 crisis.

Chargement de la formation
HomeOur trainingsDiscover Mercure
Discover Mercure

Discover Mercure

Mercure is a web protocol allowing to push data updates to web browsers (or other HTTP clients) in a convenient, fast, reliable and battery-efficient way. Mercure is especially useful to publish real-time updates of resources served through web APIs.

Book a training session

juillet 2020
lun.
mar.
mer.
jeu.
ven.
sam.
dim.
29
30
01
02
03
04
05
 
06
07
08
09
10
11
12
 
13
14
15
16
17
18
19
 
20
21
22
23
24
25
26
 
27
28
29
30
31
01
02
 
  • Available
  • Last places
  • Full

Duration

Duration2 days

Level

Level requiredIntermediate

Rate

1600€ HT/person

Prerequisites

  • Good knowledge of PHP and POO
  • A laptop to bring with you

Program


1 - Protocol presentation

Use case

  • Straight availibilty
  • Asynchronous uses
  • Collaborative building 


Differences and similarities between Mercure and existing protocols:

  • With Server-Sent Events
  • With Websocket
  • With Websub 
  • With Web Push

Presentation of HTTP/2 and its use with Mercure

Presentation of HTTP/3 and its use with Mercure

2 - Hub

  • Classical installation
  • Installation with Docker
  • Installation with Kubernetes
  • Automatic HTTP/2 and HTTPS support (using Let's Encrypt)
  • Configuration
  • Alternative implementation (Hub Node.js)

3 - Client side

  • JavaScript: EventSource class
  • Regards related to cross-domains cookies
  • Configure CORSs
  • Polyfill for old browser

4 - Authorization

  • Presentation of Mercure authorization mechanism
  • Presentation of JWT tokens format
  • Targets
  • Publication rights
  • Subscription rights
  • Authorization through cookies
  • Authorization through HTTP header

5 - Mercure and APIs

  • REST, HATEOAS and hypermedia reminders
  • Presentation of auto-discoverable through Web Linking
  • Use Mercure for GraphQL subscriptions

6 - Mercure integration with main frameworks and languages

  • Example with API Platform and Symfony (PHP, through Hub)
  • Example with Node.js (through Hub)
  • Use without hub with Go
  • Use without hub with Node.js

7 - End-to-end encryption