Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-sent events support #63

Open
sunng87 opened this issue Dec 17, 2021 · 7 comments
Open

Server-sent events support #63

sunng87 opened this issue Dec 17, 2021 · 7 comments

Comments

@sunng87
Copy link
Owner

sunng87 commented Dec 17, 2021

Attempt to add support for server-sent events(SSE) on current ring model, like how we supported websocket.

@sunng87 sunng87 changed the title Server-send event support Server-sent events support Dec 17, 2021
@rawoke083
Copy link

Any progress on this ?

@sunng87
Copy link
Owner Author

sunng87 commented Jul 18, 2022

I did some early investigation that SSE may not require adapter level support. It can be implemented via a library in ring ecosystem, like https://github.com/bobby/ring-sse/

I don't have real-world use case for SSE at the moment. Could you please check if the library work for you?

@rawoke083
Copy link

Thanks, I saw that library, it's 4 years since it's been last updated, also could not figure out how to hook it up to a normal ring-application. Once again there seems to be only cryptic code snippets. I've asked the author to provide a minimal working example 6 days ago, no joy this far.

Seems to be the common problem in Clojure, Either completely out of date libraries or these extreme short and cryptic code-snippets that should somehow be regarded as documentation or examples. :/

@TimoKramer
Copy link

https://github.com/kumarshantanu/ring-sse-middleware

@lnostdal
Copy link

lnostdal commented Aug 31, 2023

I'm surprised SSE doesn't seem to work. Does other forms of streaming HTTP responses work?

edit: By the way, the original ring project is upgrading to Jetty 11 now: ring-clojure/ring#481 ...still alpha, but SSE seems to work.

@sunng87
Copy link
Owner Author

sunng87 commented Sep 2, 2023

Did you see any error log, or error behavior with SSE on this adapter? I might be able to create a fix for that.

@lnostdal
Copy link

lnostdal commented Sep 2, 2023

It seems to go silent, no error, and no HTTP response. Then after a while the connection closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants