GenieFramework / Genie.jl

🧞The highly productive Julia web framework
https://genieframework.com
MIT License
2.27k stars 192 forks source link

Can you do server sent events in Genie? #443

Open formoxyz opened 2 years ago

formoxyz commented 2 years ago

Hi, I am trying to evaluate whether Genie can be used for my new project. I couldn't find if Genie supports server sent events. If so, an example would be deeply appreciated.

Also does Genie support PubSub?

Thanks for the good work you are doing with Genie.

essenciary commented 2 years ago

Yes, Genie implements communication over WebSockets (pub/sub) with optional fallback to server polling over http.

Here is a bit of an intro: https://genieframework.github.io/Genie.jl/dev/tutorials/17--Working_with_Web_Sockets.html

But basically everything in the Stipple ecosystem is built over Genie's websockets: https://github.com/GenieFramework/Stipple.jl (you can check out the demos linked there).

If you need more help ask away, we should probably add more docs for this feature.

formoxyz commented 2 years ago

Web sockets are great. Thanks for sharing the link.

I was looking for Server sent events. Also by pubsub I meant something like Phoenix PubSub

Stipple ecosystems looks great. All the best.

My use case is to try to use HTMX with Genie.