-
Notifications
You must be signed in to change notification settings - Fork 111
[experimental] Restate-lite library #3903
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
6077779 to
aa67655
Compare
tillrohrmann
left a comment
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.
Thanks a lot for adding the lite crate @AhmedSoliman. It already feels really lite to start a Restate node with it :-) Tested it locally and works like a charm :-) +1 for merging.
| let common = common_builder.build()?; | ||
|
|
||
| let bifrost = BifrostOptionsBuilder::default() | ||
| .default_provider(ProviderKind::Local) |
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.
Didn't we want to remove the local provider kind at some point to reduce the maintenance surface?
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.
It's still up to debate and we can make the final decision on that before cutting v1.6. I chose the local loglet for its simplicity in the embedded setup. Perhaps it can be feature gated and only enabled in the library mode or something along those lines.
| pub enum AddressKind { | ||
| Tcp, | ||
| Unix, | ||
| Http, | ||
| } |
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.
You are not relying on the protobuf types in case we make them an optional feature in restate-core?
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.
The primary reason is to have tight control over the public interface of this library and to make it easy to export those types through FFI boundaries without coupling the original types to that requirement.
| // apply config cascading propagation | ||
| config.common.set_derived_values()?; | ||
| config.ingress.set_derived_values(&config.common); | ||
| config.admin.set_derived_values(&config.common); | ||
| let config = config.apply_cascading_values(); | ||
| config.validate()?; |
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.
Nit: Maybe this is something to make part of Configuration and share with the ConfigLoader so that it is easier to keep up to date?
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.
Yes, definitely that part of configuration isn't very pretty. I've some ideas and plans but I'd tackle them in the scope of another future PR.
This introduces `restate-lite` a crate that provides restate core functionality as a library. The library is intended to be used in developement or testing use cases. Therefore, it uses defaults tuned for for that purpose.
This introduces
restate-litea crate that provides restate core functionality as a library. The library is intended to be used in developement or testing use cases. Therefore, it uses defaults tuned for for that purpose.Stack created with Sapling. Best reviewed with ReviewStack.