oksse icon indicating copy to clipboard operation
oksse copied to clipboard

Question: No changes in 2+ years, should we consider moving to okhttp-sse instead?

Open glureau-betclic opened this issue 5 years ago • 2 comments

I'll soon start a SSE project, not sure if I should go with this library that looks dedicated to the problem or pick the experimental project from okhttp main repository https://github.com/square/okhttp/tree/master/okhttp-sse as it has more recent changes (2 months). On this library I see no recent changes and the latest version is not a 1.0 but a 0.9, so I'm not sure about the confidence I can have on this lib to push this in production. Maybe it's stable and used in production for years, then I understand there is no changes required, in such case thanks for your responses.


Also I have a question about the listeners, the mechanism from okhttp-sse seems simpler, is there differences in the SSE protocol (2 RFCs?) or does this library provides advanced retry mechanism hence the more complex API? https://github.com/square/okhttp/blob/master/okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

glureau-betclic avatar Jul 16 '20 08:07 glureau-betclic

Good question, i'm wondering the same. okhttp-sse is clearly not documented enough imo.

I did try oksse, in works flawlessly without code boilerplate, so today, i'd still give oksse a go, but it only takes a good readme on okhttp side to attract attention, users...

I'm working on android, and using retrofit, i don't see yet how retrofit will support this, it's quite a massive rework, but once it does, the choice will be a no brainer.

ghost avatar Aug 06 '20 15:08 ghost

Ditch this library, its dead and broken.

  1. it depends on an obsolete version of okhttp,
  2. it does NOT work with http/2, which is hugely important for SSE,
  3. you can't POST data to the server for setting up the connection.

All of these problems are non-issues for okhttp-sse.

Yes, the documentation sucks, but fortunately, the unit tests have everything you need to get running.

lbdroid avatar Apr 13 '21 22:04 lbdroid