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

Refactor DO Bindings and extract them to utils #463

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

mendess
Copy link
Collaborator

@mendess mendess commented Dec 20, 2023

Instead of using global constants to encode the various bindings and methods, define a more intuitive and typesafe api for interacting with DOs.

Also add an abstraction that makes use of these types to implement the communication with the future storage proxy

@mendess mendess self-assigned this Dec 20, 2023
@mendess mendess force-pushed the mendess/refactor-do-bindings branch 11 times, most recently from fdd9d15 to 2b671ae Compare December 20, 2023 19:51
Copy link
Contributor

@cjpatton cjpatton left a comment

Choose a reason for hiding this comment

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

Beautiful work! I think the main thing that's left to do is to add a bit of versioning. I'm also not super happy with the custom serialization format for the storage proxy. Ideally we don't have a mixture of serialization formats unless we absolutely have to.

Cargo.toml Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_worker/src/storage_proxy.rs Show resolved Hide resolved
daphne_worker/src/storage_proxy.rs Outdated Show resolved Hide resolved
daphne_worker/src/storage_proxy.rs Show resolved Hide resolved
daphne_worker/src/storage_proxy.rs Outdated Show resolved Hide resolved
daphne_worker/src/storage_proxy.rs Show resolved Hide resolved
Copy link
Contributor

@cjpatton cjpatton left a comment

Choose a reason for hiding this comment

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

I meant to request changes to make sure we at least address versioning.

@mendess mendess force-pushed the mendess/refactor-do-bindings branch 4 times, most recently from 7448560 to d724c41 Compare December 21, 2023 17:57
@mendess mendess force-pushed the mendess/refactor-do-bindings branch 6 times, most recently from 3b0d2bb to 653f0f6 Compare December 21, 2023 19:40
Copy link
Contributor

@cjpatton cjpatton left a comment

Choose a reason for hiding this comment

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

Looks good to me! Great work.

My one suggestion would be to add a version prefix to the path of the request from the edge service to the storage proxy. capnproto only solves the versioning problem if we decide to always use capnproto. It's still a good idea I think to version the path so that we can change to something else if we needed to. (Hopefully we don't.)

daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
daphne_service_utils/src/durable_requests/mod.rs Outdated Show resolved Hide resolved
@mendess mendess force-pushed the mendess/refactor-do-bindings branch 10 times, most recently from ba5e7cc to 1fe5a90 Compare December 21, 2023 22:20
Make a more intuitive and typesafe api for interacting with DOs
@mendess mendess force-pushed the mendess/refactor-do-bindings branch 2 times, most recently from c32f833 to bac1448 Compare December 21, 2023 22:26
@mendess mendess merged commit c334089 into main Dec 21, 2023
4 checks passed
@mendess mendess deleted the mendess/refactor-do-bindings branch December 21, 2023 23:33
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.

None yet

2 participants