GithubHelp home page GithubHelp logo

Comments (11)

purehyperbole avatar purehyperbole commented on August 23, 2024 3

@loeffel-io The implementation adheres to the SSE specs on everything with the exception of supporting the retry field. We use exponential backoff to determine when to reconnect, so it never made sense to support that usecase where that value is actually used, which isn't everywhere.

It's something that could be added easily however, or you can set your own reconnect strategy by setting ReconnectStrategy

from sse.

purehyperbole avatar purehyperbole commented on August 23, 2024 1

Hi!

As the library was released with a server implementation and was only intended to be used in conjunction with one another, there was never any emphasis on conforming to the EventSource Spec per say.

Given that this library is seeing more use than I anticipated, any changes to improve adherence to ES spec is a good thing.

So far the changes on your branch look great! :)

Once you've got something that you're happy to submit, please open a PR and i'll do some testing

Cheers

from sse.

jeffreydwalter avatar jeffreydwalter commented on August 23, 2024 1

Going to leave this open since retry isn't fully implemented.

from sse.

jeffreydwalter avatar jeffreydwalter commented on August 23, 2024

This library is also missing the retry semantics and the handling of the Last-Event-ID doesn't seem right.

from sse.

jeffreydwalter avatar jeffreydwalter commented on August 23, 2024

I've used this Python sse client library in production code and have looked at it's code quite a bit. It seems to follow the standard pretty closely and would be a good library to model.

from sse.

Muddz avatar Muddz commented on August 23, 2024

@purehyperbole What is the status of this? Isn't it implemented fully now to be complient with EventSources specifications?

from sse.

loeffel-io avatar loeffel-io commented on August 23, 2024

Any update on this?

from sse.

loeffel-io avatar loeffel-io commented on August 23, 2024

Thanks for the info @purehyperbole

from sse.

cryptix avatar cryptix commented on August 23, 2024

The implementation adheres to the SSE specs on everything with the exception of supporting the retry field.

Great news! I suggest changing the issue title to reflect this new state. I got a bit worried for a moment when evaluating if we should use this for a new project.

from sse.

alevinval avatar alevinval commented on August 23, 2024

FYI you can find spec compliant and optimised decoder here maybe you find it useful. You can use the decoder with any io.Reader, so it should not be hard to integrate. You could ignore the rest of the primitives.

from sse.

mapero avatar mapero commented on August 23, 2024

Hi. We have noticed there is a mandatory query parameter "stream" in the server implementation. Without providing the parameter, the connection will not be established. This seems to be something that is not specified by the spec and will prevent to use this library with other sse client implementations.
Is it possible to make this parameter optional or completely remove it?

Thanks.

from sse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.