Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async persister interface #484

Open
7 tasks
elijahbenizzy opened this issue Dec 20, 2024 · 0 comments
Open
7 tasks

Async persister interface #484

elijahbenizzy opened this issue Dec 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elijahbenizzy
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current persister interface is synchronous. This can cause performance issues in asynchronous code.

Describe the solution you'd like
We should have a separate stack for asynchronous persistence -- ideally with modes for either (1) fire-and-forget or (2) blocking/transactional (depends on how consistent the user wants it -- this part might be general persister configuration, rather than async-specific).

To dig in, we will need:

  • Persistence interfaces for this (BaseStateLoader, BaseStateSaver, PersisterHook) -- each converted to async
  • A few default implementations (SQLLite, redis? TBD -- go with the easy ones on this)
  • Integrations with application
    • asynchronous build() method in application builder (.abuild()) - or maybe another builder? Guess is we want an asynchronous build method
    • validation in .run() -- E.G. if you have async hooks they will not be called -- at least a warning message if not an error
  • Comprehensive testing for ^^^
  • Think through integration with parallel actions --- will want an acreate_app here.

Describe alternatives you've considered

Could have synchronous fire/forget mode, although we very likely want something transactional.

@elijahbenizzy elijahbenizzy added the enhancement New feature or request label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant