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

Make the two service handler implementation styles (contract-first vs dynamic TypeScript handlers) more explicit and upfront #219

Closed
Tracked by #265
pcholakov opened this issue Dec 14, 2023 · 3 comments

Comments

@pcholakov
Copy link
Contributor

Somewhere in our documentation hierarchy, we should have a page that talks about contract-first vs. dynamic handlers - maybe before we even introduce service types:

image
@gvdongen
Copy link
Contributor

I think we touch upon this here: https://docs.restate.dev/services/sdk/overview
In the info box as well as in the example with an implementation of both APIs.
I agree that we might need to add a bit more information/context here though.

@pcholakov
Copy link
Contributor Author

I must be going blind! That's pretty much exactly what I was hoping to see – we can definitely make it a bit clearer still but that covers it. Maybe this is a good place to ask: how do you feel about reversing the order of the gRPC examples to show the Protobuf IDL first, before the handler code? We might generically call the two approaches "dynamic" vs. "contract-first", and particularly for Java/Kotlin, you have to write the IDL first to generate the implementation stubs.

@pcholakov pcholakov changed the title Cover different service handler implementation styles (Protobuf IDL contract-first vs dynamic TypeScript handlers) Make the two service handler implementation styles (contract-first vs dynamic TypeScript handlers) more explicit and upfront Jan 4, 2024
@gvdongen
Copy link
Contributor

@pcholakov I missed the notification for your message, sorry for the late reply.

We use the handler code first because it's the easiest to get started with. It improves the first experience with Restate.
Besides the tour and the quickstart, I think both versions are addressed equally in the rest of the docs? One thing that is missing is a good overview of how they differ or when to use which one. Related issue: https://github.com/restatedev/devrel/issues/8

I will close this issue as the open to do is covered by https://github.com/restatedev/devrel/issues/8 (unless you disagree?)

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

No branches or pull requests

2 participants