kumarshantanu / ring-sse-middleware

Ring middleware to stream Server-sent Events
Eclipse Public License 1.0
19 stars 2 forks source link

Question about Jetty and the documentation #5

Open kendagriff opened 1 year ago

kendagriff commented 1 year ago

Reading the following quote from documentation...

This example uses generic g/generate-stream streaming function. In theory it should work with all web servers, but in practice it works with only few, often poorly. For proper Server-sent Events support consider one of the non-generic web servers.

... seems to suggest that the library supports Jetty only poorly. Am I reading this correctly? In what ways does it perform poorly?

kendagriff commented 1 year ago

@kumarshantanu: Sorry to be a pest—is there a short clue to the question above 👆 Much thanks for the help.

kumarshantanu commented 1 year ago

@kendagriff Sorry about the delayed response. At the time of writing that doc, the version of Jetty in use had poor support for time-granularity of server-side side response chunks, which meant the server would generate the response but it won't be immediately flushed out to the client until more content has been accumulated or more time has elapsed. There are newer versions of Jetty now that needs to be verified for better SSE support.

kendagriff commented 1 year ago

Okay, that's very helpful, thank you!