Long-running streams UX
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 169
Description
When creating a long-running agent, especially one that runs indefinitely, the writer can grow quite large.
I’m persisting all messages to the database, so ideally the reader would resume after the last message stored there. Right now the only obvious way to do this is by counting chunks and tracking that offset in the database.
It would be great if I could reset the writer state so that future connections only read from the new starting point. I can use startIndex, but if a client has never connected before, this can still return megabytes (or more) of data that the client already has.
For now I can read the sum of parts and index based off that, it's just kinda janky.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by tracing the stream writer and reader behavior around startIndex and persisted messages, then define how resetting the writer affects new connections; done means a client does not replay already-stored data while still receiving future messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100