-
Notifications
You must be signed in to change notification settings - Fork 18
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
Conversation
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
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.
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
java/food-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/DeliveryManager.java
Outdated
Show resolved
Hide resolved
java/food-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/DeliveryManager.java
Outdated
Show resolved
Hide resolved
java/food-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/DeliveryManager.java
Outdated
Show resolved
Hide resolved
...d-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/DriverDeliveryMatcher.java
Outdated
Show resolved
Hide resolved
...d-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/DriverDeliveryMatcher.java
Outdated
Show resolved
Hide resolved
...pp/restate-app/src/main/java/dev/restate/sdk/examples/external/DriverMobileAppSimulator.java
Outdated
Show resolved
Hide resolved
...dering/app/restate-app/src/main/java/dev/restate/sdk/examples/types/DeliveryInformation.java
Outdated
Show resolved
Hide resolved
...-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/types/AssignedDelivery.java
Outdated
Show resolved
Hide resolved
java/food-ordering/app/restate-app/src/main/java/dev/restate/sdk/examples/types/Location.java
Outdated
Show resolved
Hide resolved
…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 { |
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.
Why the rename to Enum
?
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.
Because it collided with Status in the proto definitions
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.
Last commit lgtm