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 Java food ordering example #62

Merged
merged 32 commits into from
Jan 16, 2024
Merged

Add Java food ordering example #62

merged 32 commits into from
Jan 16, 2024

Conversation

gvdongen
Copy link
Collaborator

@gvdongen gvdongen commented Jan 4, 2024

  • The food ordering examples as presented at Current 2023, implemented with the Java SDK.
  • Docker compose set up to run the example

@gvdongen gvdongen marked this pull request as ready for review January 4, 2024 15:48
@slinkydeveloper slinkydeveloper self-requested a review January 10, 2024 09:38
Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

One comment I have is that the POJOs you used for state, awakeables and location are all coded with different styles: some have mutable fields, some are private and others are public.

I suggest to just adopt a single style, to make that code simpler to follow. One style I usually follow myself is to create immutable pojos, with private final fields, and eventually make some fields mutable with setters if I need to. For that, you only need an annotated constructor and the getters, e.g. like this: https://github.com/restatedev/notebook-demo/pull/6/files#diff-a373f8bd90769e63096ed7b18dfdb98a8fe19ed3df9a8bcf08aefe3d2296c010R7

gvdongen and others added 11 commits January 12, 2024 10:37
…dk/examples/DeliveryManager.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/DriverDeliveryMatcher.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/DriverDeliveryMatcher.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/DriverDigitalTwin.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/external/DriverMobileAppSimulator.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/DriverDigitalTwin.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/DriverDigitalTwin.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/OrderStatusService.java

Co-authored-by: Francesco Guardiani <[email protected]>
…dk/examples/clients/KafkaPublisher.java

Co-authored-by: Francesco Guardiani <[email protected]>
@@ -1,6 +1,6 @@
package dev.restate.sdk.examples.types;

public enum Status {
public enum StatusEnum {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the rename to Enum?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it collided with Status in the proto definitions

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Last commit lgtm

@gvdongen gvdongen merged commit 64a5f60 into main Jan 16, 2024
2 checks passed
@gvdongen gvdongen deleted the java_food_ordering branch January 16, 2024 09:05
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