← Back to all tweets

Tweet by @zirkelc_

View original on X

Resumable streaming seems hard, but most of the complexity was already solved by Vercel's package The rest can be implemented in roughly ~40 lines I put the remaining logic into a reusable fn to copy-paste into my projects Then simply call it on `send` and `resume` endpoints

Image
Chris Cook
Chris Cook
@zirkelc_

I'm a bit obsessed with resumable streaming Here's another CLI example: - server calls `streamText` and persists stream in Redis - 1st client initiates the stream - 2nd client resumes the running stream, quickly catches up and then runs in sync with the 1st client

99
Reply