Get server sent events (SSE) working with chunking proxies

Yeah, my application is working! What? It’s not working? What the heck? Rolling out server sent events (SSE) to production can be a hard way. In most situation it’s working fine, but sometimes the event sinks are not notified – or better – only notiefied after some minutes. Let’s solve the riddle.

Whats going on?

Due to older or misconfigured proxies, network elements, the data of a server sent event is tried to chunk. But that’s not the idea of SSE.

The post of Mike Talbot (see https://dev.to/miketalbot/server-sent-events-are-still-not-production-ready-after-a-decade-a-lesson-for-me-a-warning-for-you-2gie) helped me a lot to go in the right direction. And Kevin Douglas comment pointed out the solution ( https://dev.to/dunglas/comment/103cg )

Thanks a lot!

Stability enhanced with LastID

Server sent events have the option to carry an individual id. In case of a connection breakdown the lastid helps at reconnect to update the client to the most actual state.

In conjunction with the implementation of lastid I optimised the reconnect delay.

tech stack

What about the tech stack?

I developed scrumpoker.works in Java. As web framework I used Microprofile / Quarkus. It’s a smart choice when you want to go serverless. For the frontend javascript react with material ui (mui) is performing perfectly.

As source code repository I use gitlab.

Lets have a look at the infrastructure for production. Nowadays using a cloud is standard. I opted for google cloud plattform (gcp). In GCP there are again some options. Google app engine (GAE) is a great technological option as you can focus on the java application. But as I use server sent events (SSE) I needed to switch to google cloud run (GCR). And happily discovered GCR as the more modern and even cost saving variant.

Blog site MVP

The blog site for www.scrumpoker.works is now online as minimum viable product. So Google and the other search engines may crawl their way to guide you to your favorite tool for agile estimations.

Launch of first version

As of June 26th 2022 the first public version of scrumpoker.works is launched. It provides an easy to use scrumpoker app with user friendly defaults.

screenshot of first version

Features like native sharing of the poker room, creating a new room, resetting submitted values and clearing the room from all participants are already included.

Have fun! 🙂