>From a backend perspective, i would also argue that SSE are way more easier to *scale* than web sockets (due to working on HTTP (SSE) versus working on TCP(WS)).
On Wednesday, September 14, 2016 at 3:34:41 PM UTC+2, Erwan Queffélec wrote: > > > one would have to come up with a very convincing argument (use-case) to > justify spending resources in the design and implementation of Elm's > EventSource API > > Tough one - especially since it's hard to not make that argument an > argument about SSE vs WebSockets, but I'll give it a shot > > Some context : I'm (we are) actually building a production application > with elm 0.17 > > The simple argument would be : SSE is part of the HTML spec ( > https://html.spec.whatwg.org/multipage/comms.html#server-sent-events). > Why not follow the standard ? > > The complex argument would be that both technically and feature wise, SSE > and websockets do not really overlap each other - > > - One could build an event-sourcing protocol over websockets, but it's > just one of their application. Web sockets are not > - While websockets are initiated by HTTP requests, it's a different > protocol. SSE is still HTTP. This has numerous implications form an > infra/devops perspective : for instance, SSE will go through firewall, > proxies, load-balancers as long as regular HTTP requests will. > > In short, having SSE in elm makes sense to me, because it can make sense > to use SSE over WebSockets (especially from a backend perspective) > > On Wednesday, September 14, 2016 at 2:08:11 PM UTC+2, Peter Damoc wrote: >> >> The only clean way is to use a port. >> >> The unclean but practical way to do this is to use Native (this is what >> you have in the git repository you linked) >> >> To my knowledge, there is no built-in way of doing this in pure Elm and >> from how I understand the development of Elm, there are little chances for >> this to be on any roadmap. >> The functionality overlaps that of websockets (which is already available >> in Elm) and one would have to come up with a very convincing argument >> (use-case) to justify spending resources in the design and implementation >> of Elm's EventSource API (Elm takes API design very seriously). >> >> >> >> >> >> >> On Wed, Sep 14, 2016 at 1:16 PM, Erwan Queffélec <[email protected]> >> wrote: >> >>> Hi, >>> >>> I'm trying to find the cleanest possible way of subscribing and >>> receiving server side events (SSE) ( >>> http://www.html5rocks.com/en/tutorials/eventsource/basics/) >>> >>> So far I found this >>> https://stackoverflow.com/questions/35144530/how-to-capture-server-events-in-elm >>> >>> And this (code contributed by the SO answer author): >>> https://github.com/lukewestby/elm-http-event-source >>> >>> Is there any built-in way of doing this with elm yet ? Is that somewhere >>> on the roadmap ? >>> >>> Regards, >>> >>> Erwan >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Elm Discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> There is NO FATE, we are the creators. >> blog: http://damoc.ro/ >> > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
