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 CDK reference page #234

Merged
merged 13 commits into from
Dec 19, 2023
Merged

Add CDK reference page #234

merged 13 commits into from
Dec 19, 2023

Conversation

pcholakov
Copy link
Contributor

A brief intro to using the Restate CDK constructs library.

A brief intro to using the Restate CDK constructs library.
Copy link

cloudflare-workers-and-pages bot commented Dec 18, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 35d8675
Status: ✅  Deploy successful!
Preview URL: https://10ac2971.documentation-beg.pages.dev
Branch Preview URL: https://cdk-intro.documentation-beg.pages.dev

View logs

@pcholakov
Copy link
Contributor Author

I'm wondering if we shouldn't completely replace https://docs.restate.dev/category/aws-lambda with this method of deploying Lambda handlers! It's so much more streamlined.

Copy link
Contributor

@gvdongen gvdongen left a comment

Choose a reason for hiding this comment

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

Great addition to simplifying deploying Restate, Pavel! :)
The page reads nice and easy. I would suggest to make the distinction of how to do things with the managed service vs self-hosted a bit more clear. Not sure how to do that most easily: just in words, tabs, different sections/paragraphs...

docs/services/deployment/cdk.md Outdated Show resolved Hide resolved
});
```

For TypeScript/JavaScript services, you can use the [`NodejsFunction`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we put this behind tabs? One for TS, one for Java?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, on a second thought, the code itself is always Typescript... So not sure if tabs would make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're onto something though! I'll play with tabs - I hadn't thought of that in this context. Ditto for self-hosted / managed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It came out much nicer, thank you for the suggestion!

docs/services/deployment/cdk.md Outdated Show resolved Hide resolved
docs/services/deployment/cdk.md Outdated Show resolved Hide resolved
docs/services/deployment/cdk.md Outdated Show resolved Hide resolved
tracing: restate.TracingMode.AWS_XRAY,
logGroup: new logs.LogGroup(scope, "RestateLogs", {
logGroupName: "/restate/server-logs",
retention: logs.RetentionDays.ONE_MONTH,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also add how to define a specific VPC for deployment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it out because I think it's a better default to deploy Restate in its own VPC. Advanced customers who know what they're doing can easily define their own or connect it to an existing VPC.

A related question is whether we should similarly auto-create a log group for Restate server logs if the user doesn't supply one. Right now that's a required property.

});
```

Automatically register service handlers with Restate on deployment:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this sentence might need a bit more context and explanation on how it differs from the normal registration practices.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the primary way this differs is in the same way how Lambda deployments differ – they always refer to an explicit version of the function, and every function update generates a new deployment revision. Is that what you had in mind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've expanded the text to cover this - let me know if you can think of something more to add!

@pcholakov pcholakov merged commit 1f26daf into main Dec 19, 2023
3 checks passed
@gvdongen gvdongen deleted the cdk-intro branch March 6, 2024 09:24
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