Skip to content

Long-running streams UX #266

@kylecarbs

Description

@kylecarbs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions