Skip to content

Improve performance of ActorState by generating JsonContext for it #138

@kzu

Description

@kzu

This can be used by a storage provider that can more efficiently serialize it to JSON, such as the streamstone one for the snapshot.

The tricky part is that if we want to emit a single JsonSerializerContext-derived class for the whole app (ideal since the storage provider must deal potentially with multiple grains), we'd need to emit it at the app level. But if we do so, we'd need to take a dependency on the STJ generator and generators cannot depend on each other: this means our emitted JSON context won't be seen by the built-in STJ generator and it won't work.

So this might require quite a bit more work than it might seem initially.

An alternative is to emit a context per actor/state, but then you'd have an explosion of configuration since each actor/grain would need to use a specific storage provider that's been configured with a specific JsonOptions :(

Back this issue
Back this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions