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 docker compose setup #258

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

Conversation

pavan4
Copy link

@pavan4 pavan4 commented Mar 20, 2025

This PR adds:

  • A docker compose setup to start everything up and register a sample endpoint
  • Update the readme to reflect the changes

Copy link
Contributor

github-actions bot commented Mar 20, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@pavan4
Copy link
Author

pavan4 commented Mar 20, 2025

I have read the CLA Document and I hereby sign the CLA

@tillrohrmann
Copy link
Contributor

cc @gvdongen

Copy link

@joebowbeer joebowbeer left a comment

Choose a reason for hiding this comment

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

For maximum utility, consider adding a .devcontainer instead or in addition:

https://devcontainers.github.io/

@pavan4 pavan4 force-pushed the pavan/add-docker-compose-startup branch from 46cf4f8 to 4a0b732 Compare March 20, 2025 13:51
@pavan4 pavan4 requested a review from joebowbeer March 20, 2025 14:09
Copy link
Collaborator

@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.

Hi! Thank you for your contribution.

The section in the Readme as well as the Docker compose file should move to the Typescript basics example, since it are instructions to run this specific example.

Besides that, I am not fully convinced that this is the right approach since it abstracts away so much that you don't really understand anymore what you did. Running the docker compose setup in detached mode makes you also not see the retries in the service logs. Unless you maybe add a docker logs command to the readme.

I am trying to figure out whether there is some nice middle ground where the user understands that there is a server running and a service and sees how the retries take place, while making it easier to run. What are your thoughts on this?

docker compose up -d
```
This will bring up
- restate server
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- restate server
- Restate Server

```
This will bring up
- restate server
- [typescript example-0](typescript/basics/src/0_durable_execution.ts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- [typescript example-0](typescript/basics/src/0_durable_execution.ts)
- [TypeScript basics Durable Execution example](typescript/basics/src/0_durable_execution.ts)

This will bring up
- restate server
- [typescript example-0](typescript/basics/src/0_durable_execution.ts)
- register the endpoint /service with restate
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- register the endpoint /service with restate
- register the endpoint /service with Restate

"subscriptions" : ["Netflix", "Disney+", "HBO Max"]
}'

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this can be simplified to:

curl localhost:8080/SubscriptionService/add \
  -H 'idempotency-key: some-key-for-idempotency' \
  --json '{
    "userId": "Sam Beckett",
    "creditCard": "1234-5678-9012-3456",
    "subscriptions" : ["Netflix", "Disney+", "HBO Max"]
}'

@pavan4
Copy link
Author

pavan4 commented Mar 21, 2025

Thank you for the review. Happy to help.

The section in the Readme as well as the Docker compose file should move to the Typescript basics example, since it are instructions to run this specific example.

Yeah, happy to move all those to Typescript basics folder if needed.

Besides that, I am not fully convinced that this is the right approach since it abstracts away so much that you don't really understand anymore what you did. Running the docker compose setup in detached mode makes you also not see the retries in the service logs. Unless you maybe add a docker logs command to the readme.

I am trying to figure out whether there is some nice middle ground where the user understands that there is a server running and a service and sees how the retries take place, while making it easier to run. What are your thoughts on this?

For some context, this all came about from #161 I am just trying to follow up from there.

But my two cents - I personally used the compose file first ran everything to see it working and only then dug into how it works, including checking the logs etc., I just didn't want to install a bunch of things and try to setup everything line by line as a first step. Of course, once I understood, I then went into doing all that. I found more value in the ease of bringing everything up and seeing it working end to end than looking at retries and logs.

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.

4 participants