-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Add permanent storage option for EventStream #1697
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
Conversation
AWS_S3_ENDPOINT = 's3.amazonaws.com' | ||
|
||
|
||
class S3FileStore(FileStore): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe put s3.py into a directory of cloud provider will be better, so we can add some other cloud file storage like azure bolb, Google Cloud Storage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree we'll probably add these in the future! Let's create a subdirectory then if we decide we need it
good catch @assertion! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1697 +/- ##
=======================================
Coverage ? 61.37%
=======================================
Files ? 108
Lines ? 4241
Branches ? 0
=======================================
Hits ? 2603
Misses ? 1638
Partials ? 0 ☔ View full report in Codecov by Sentry. |
I haven't got to test it, otherwise LGTM! |
This allows EventStream to persist to a local or remote filesystem, instead of keeping all state in-memory.
This is helpful for a high-availability situation. For example, currently, if you rolled out a new deployment, any websockets would be disconnected, existing user sessions would be cancelled, and all the session data would be lost.
With this change, the client could reconnect to a new instance of the application, and the EventStore could rehydrate from persistent storage.
This change also factors action/observation/event serialization and deserialization into its own spot, to avoid circular imports