Skip to content

Commit

Permalink
Link to code
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Dec 19, 2024
1 parent 0a7e462 commit 9f34700
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions java/patterns-use-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

Common tasks and patterns implemented with Restate:

| Category | Use case / Name | | | Difficulty | Description |
|------------------|------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
| Microservices | Durable RPC | [code](src/main/java/my/example/durablerpc) | [README](#microservices-durable-rpc) | Basic | Restate persists requests and makes sure they execute exactly-once. |
| Microservices | Sagas | [code](src/main/java/my/example/sagas) | [README](#microservices-sagas) | Basic | Preserve consistency by tracking undo actions and running them when code fails halfway through. |
| Microservices | Stateful Actors | [code](src/main/java/my/example/statefulactors) | [README](#microservices-stateful-actors) | Basic | State machine with a set of transitions, built as a Restate Virtual Object for automatic state persistence. |
| Microservices | Payment state machines | [code](src/main/java/my/example/statemachinepayments) | [README](#microservices-payment-state-machine) | Advanced | State machine example that tracks a payment process, ensuring consistent processing and cancellations. |
| Async tasks | (Delayed) Task Queue | [code](src/main/java/my/example/queue) | [README](#async-tasks-delayed-tasks-queue) | Basic | Use Restate as a queue. Schedule tasks for now or later and ensure the task is only executed once. |
| Async tasks | Parallelizing work | [code](src/main/java/my/example/parallelizework) | [README](#async-tasks-parallelizing-work3) | Intermediate | Execute a list of tasks in parallel and then gather their result. |
| Async tasks | Slow async data upload | [code](src/main/java/my/example/dataupload) | [README](#async-tasks-async-data-upload) | Intermediate | Kick of a synchronous task (e.g. data upload) and turn it into an asynchronous one if it takes too long. |
| Async tasks | Payments: async signals | [code](src/main/java/my/example/signalspayments) | [README](#async-tasks-payment-signals---combining-sync-and-async-webhook-responses-from-stripe) | Advanced | Handling async payment callbacks for slow payments, with Stripe. |
| Event processing | Transactional handlers | [code](src/main/java/my/example/eventtransactions) | [README](#event-processing-transactional-handlers-with-durable-side-effects-and-timers) | Basic | Processing events (from Kafka) to update various downstream systems in a transactional way. |
| Event processing | Enriching streams | [code](src/main/java/my/example/eventenrichment) | [README](#event-processing-event-enrichment) | Basic | Stateful functions/actors connected to Kafka and callable over RPC. |
| Category | Use case / Name | | | Difficulty | Description |
|------------------|------------------------------------------|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
| Microservices | Durable RPC | [code](src/main/java/my/example/durablerpc/MyClient.java) | [README](#microservices-durable-rpc) | Basic | Restate persists requests and makes sure they execute exactly-once. |
| Microservices | Sagas | [code](src/main/java/my/example/sagas/BookingWorkflow.java) | [README](#microservices-sagas) | Basic | Preserve consistency by tracking undo actions and running them when code fails halfway through. |
| Microservices | Stateful Actors | [code](src/main/java/my/example/statefulactors/MachineOperator.java) | [README](#microservices-stateful-actors) | Basic | State machine with a set of transitions, built as a Restate Virtual Object for automatic state persistence. |
| Microservices | Payment state machines | [code](src/main/java/my/example/statemachinepayments/PaymentProcessor.java) | [README](#microservices-payment-state-machine) | Advanced | State machine example that tracks a payment process, ensuring consistent processing and cancellations. |
| Async tasks | (Delayed) Task Queue | [code](src/main/java/my/example/queue/TaskSubmitter) | [README](#async-tasks-delayed-tasks-queue) | Basic | Use Restate as a queue. Schedule tasks for now or later and ensure the task is only executed once. |
| Async tasks | Parallelizing work | [code](src/main/java/my/example/parallelizework/FanOutWorker.java) | [README](#async-tasks-parallelizing-work) | Intermediate | Execute a list of tasks in parallel and then gather their result. |
| Async tasks | Slow async data upload | [code](src/main/java/my/example/dataupload/UploadClient.java) | [README](#async-tasks-async-data-upload) | Intermediate | Kick of a synchronous task (e.g. data upload) and turn it into an asynchronous one if it takes too long. |
| Async tasks | Payments: async signals | [code](src/main/java/my/example/signalspayments/PaymentService.java) | [README](#async-tasks-payment-signals---combining-sync-and-async-webhook-responses-from-stripe) | Advanced | Handling async payment callbacks for slow payments, with Stripe. |
| Event processing | Transactional handlers | [code](src/main/java/my/example/eventtransactions/UserFeed.java) | [README](#event-processing-transactional-handlers-with-durable-side-effects-and-timers) | Basic | Processing events (from Kafka) to update various downstream systems in a transactional way. |
| Event processing | Enriching streams | [code](src/main/java/my/example/eventenrichment/PackageTracker.java) | [README](#event-processing-event-enrichment) | Basic | Stateful functions/actors connected to Kafka and callable over RPC. |

## Microservices: Durable RPC

Expand Down

0 comments on commit 9f34700

Please sign in to comment.