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

Add file backend for state sessions #574

Merged
merged 4 commits into from
Jul 5, 2024
Merged

Conversation

richard-to
Copy link
Collaborator

This change also adds a new dependency with msgpack. For now we use it to serialize/deserialize the JSON strings of the Mesop state. In the future we will want to serialize everything with msgpack.

The reason we can't do this now is because we will need to add msgpack encoding/decoding rules to support non-standard data types.

This change also adds a new config variable called MESOP_STATE_SESSION_BACKEND_FILE_BASE_DIR which allows the user to specify the location where the state sessions get written.

Ref #556

This change also adds a new dependency with msgpack. For now we use it
to serialize/deserialize the JSON strings of the Mesop state. In the
future we will want to serialize everything with msgpack.

The reason we can't do this now is because we will need to add
msgpack encoding/decoding rules to support non-standard data types.

This change also adds a new config variable called
MESOP_STATE_SESSION_BACKEND_FILE_BASE_DIR which allows the user to
specify the location where the state sessions get written.
Copy link
Collaborator

@wwwillchen wwwillchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another exciting change!

I think we could use this w/ Cloud Run+GCS using https://cloud.google.com/run/docs/configuring/services/cloud-storage-volume-mounts

This could become a very nice option that's: a) scalable (you will basically not run out of GCS space), b) cheap and c) fast - according to https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/benchmarks.md#results

docs/api/config.md Outdated Show resolved Hide resolved
mesop/server/state_session.py Outdated Show resolved Hide resolved
mesop/server/state_session.py Show resolved Hide resolved
@richard-to
Copy link
Collaborator Author

This could become a very nice option that's: a) scalable (you will basically not run out of GCS space), b) cheap and c) fast - according to https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/benchmarks.md#results

Ah nice! That's a great find.

@richard-to richard-to merged commit 13ae3d7 into google:main Jul 5, 2024
3 checks passed
@richard-to richard-to deleted the file-backend branch July 13, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants