Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSE (Server Sent Events) Client library for Clojure?

I would like to handle a Server Sent Events stream in Clojure. Does anyone know a small client library to just do that please ?

I was expecting to find something like https://github.com/stalefruits/gniazdo, which is for Websockets, but for SSE.

I could not find anything though and the only lib that may have been a good candidate is not maintained anymore https://github.com/clojurewerkz/ssese

thanks in advance ...

like image 557
kaffein Avatar asked Nov 08 '22 00:11

kaffein


1 Answers

Here are some overviews on the topic:

  • https://sweetcode.io/using-html5-server-sent-events/
  • https://juxt.pro/blog/posts/course-notes.html
  • https://www.lucagrulla.com/posts/server-sent-events-with-ring-and-compojure/
  • Server push of data from Clojure to ClojureScript
  • https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events

Here is a highly voted comparison on StackOverflow between Server Sent Events and WebSockets (my favorite):

  • WebSockets vs. Server-Sent events/EventSource

And here is a nice comparison from IBM (2017):

  • https://www.ibm.com/developerworks/library/wa-http-server-push-with-websocket-sse/index.html
like image 157
Alan Thompson Avatar answered Nov 15 '22 06:11

Alan Thompson