Implementing server-sent events

While docs for action and views allude to support for reply streaming, there’s few details. Is it really advisable to have an action or view method be long-running? like arbitrarily? hours and days?

I’m implementing a set of notification counters that ideally should update in the client in real or near-real time, without polling.

Right now I’m leaning to an external solution using Firebase Cloud Messaging but would love it if I can avoid all that additional complexity.


I’m going to try implementing as a streaming view, since these client updates can be reasoned as changes to ESEs all related to the same user.

However the docs on views don’t show http or jwt annotations, but I’m hoping it will work, including support for streaming when transcoding to http. So far at least this compiles: