aliakh / demo-spring-sse

'Server-Sent Events (SSE) in Spring 5 with Web MVC and Web Flux' article and source code.
175 stars 60 forks source link

[discussion] How can will fit http2 into the picture? #2

Open johnmiroki opened 4 years ago

johnmiroki commented 4 years ago

With SSE, we now achieve server push. Can we add Http2 to the picture to achieve true bi-directional communication, and thus replace WebSocket?

fuss86 commented 4 years ago

Also,

in https://github.com/aliakh/demo-spring-sse#sse-network-protocol we can read that:

Connection: keep-alive indicates that a persistent connection is being used

This is not a valid statement taking HTTP/2 into account. See https://tools.ietf.org/html/rfc7540#section-8.1.2.2

HTTP/2 does not use the Connection header field to indicate connection-specific header fields;

BTW: great article 👍