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 SharedObjectContext example to cart_object.rs #240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kpwebb
Copy link

@kpwebb kpwebb commented Jan 29, 2025

SharedObjectContext is missing from the tutorial/example code, so added this CartObject/list handler. While this is covered in the SDK docs, nothing on the main Restate Docs site covers the shared/read-only functionality. Including it in the tour seems useful.

SharedObjectContext is missing from the tutorial/example code, so added this CartObject/list handler
@gvdongen
Copy link
Collaborator

Hi @kpwebb,

Thank you for the addition. Shared handlers are part of the Virtual Objects explanation in the Rust docs:

I will add some extra docs there. I would prefer not adding it to the Tour since the Tour is already quite long.

I do understand though that this concept is not prominent enough... I need to think for a second on how this can be improved.

Thanks again.

@kpwebb
Copy link
Author

kpwebb commented Jan 29, 2025

Thanks! I think a mention or example of the read-only option early on would be helpful. I searched the docs site for read only but couldn’t find a reference so I didn’t check the SDK docs.

Also I just realized I that there are some places in your online tutorials (e.g. the Gentle Introduction video) where its mentioned that all calls are processed sequentially. I get the emphasis on preserving order / transactional integrity, but there are lots of applications that benefit from having a non-blocking read-only path. The way you all have implemented both options is fantastic and worthy of highlighting.

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