We're cooking up a mechanism to seamlessly resume streams and share state across Fluid functions.
AI apps pose an interesting challenge to developers: they need to stream feedback in realtime, they have multiple agents behind the scenes, the conversation needs to be shareable, resumable, survive network disconnections.
Even with
socket.io, this kind of stuff was non-trivial. You always need a durability source (in this demo below, you can see the 'stream id' in the URL), so a stateful bidirectional transport like WebSocket is *not enough*. Not only is it not enough, it's also not necessary (the demo below uses good ol' HTTP streaming).
Also: what happens if the stateful Node WebSocket server was re-deployed mid-stream? or if it crashed? how do the streams recover?
I'm excited for
@vercel to give you all the primitives to execute on applications that raise the bar on not just performance, but also on fault tolerance. h/t
@cramforce for sweating the details here.