Skip to content

Commit

Permalink
Make one large patterns project
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Dec 20, 2024
1 parent ea20c3d commit e191908
Show file tree
Hide file tree
Showing 81 changed files with 640 additions and 1,767 deletions.
28 changes: 14 additions & 14 deletions typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ Learn the key concepts of Restate:

Common tasks and patterns implemented with Restate:

| Category | Use case / Name | Difficulty | Description |
|------------------|--------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
| Microservices | [Durable RPC](patterns-use-cases/microservices-durable-rpc) | Basic | Restate persists requests and makes sure they execute exactly-once. |
| Microservices | [Sagas](patterns-use-cases/microservices-sagas) | Basic | Preserve consistency by tracking undo actions and running them when code fails halfway through. |
| Microservices | [Stateful Actors](patterns-use-cases/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](patterns-use-cases/microservices-payment-state-machines) | Advanced | State machine example that tracks a payment process, ensuring consistent processing and cancellations. |
| Async tasks | [(Delayed) Task Queue](patterns-use-cases/async-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](patterns-use-cases/async-tasks-parallelize-work) | Intermediate | Execute a list of tasks in parallel and then gather their result. |
| Async tasks | [Slow async data upload](patterns-use-cases/async-tasks-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 processing](patterns-use-cases/async-tasks-payment-signals) | Advanced | Handling async payment callbacks for slow payments, with Stripe. |
| Event processing | [Transactional handlers](patterns-use-cases/event-processing-transactional-handlers) | Basic | Processing events (from Kafka) to update various downstream systems in a transactional way. |
| Event processing | [Enriching streams](patterns-use-cases/event-processing-enrichment) | Basic | Stateful functions/actors connected to Kafka and callable over RPC. |
| Patterns | [Durable Promises](patterns-use-cases/pattern-durable-promises) | Advanced | Implementation of Promises/Futures that are durable across processes and failures. |
| Patterns | [Priority Queue](patterns-use-cases/pattern-priority-queue) | Advanced | Example of implementing a priority queue to manage task execution order. |
| Category | Use case / Name | | | Difficulty | Description |
|------------------|-------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------|
| Microservices | Durable RPC | [code](src/durablerpc/MyClient.java) | [README](#microservices-durable-rpc) | Basic | Restate persists requests and makes sure they execute exactly-once. |
| Microservices | Sagas | [code](src/sagas/booking_workflow.ts) | [README](#microservices-sagas) | Basic | Preserve consistency by tracking undo actions and running them when code fails halfway through. |
| Microservices | Stateful Actors | [code](src/statefulactors/machine_operator.ts) | [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/statemachinepayments/payment_service.ts) | [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/queue/task_submitter.ts) | [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/parallelizework/fan_out_worker.ts) | [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/dataupload/client.ts) | [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/signalspayments/payment_service.ts) | [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/eventtransactions/user_feed.ts) | [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/eventenrichment/package_tracker.ts) | [README](#event-processing-event-enrichment) | Basic | Stateful functions/actors connected to Kafka and callable over RPC. |
| Patterns | Durable Promises | [code](durablepromise) | [README](#pattern-durable-promise) | Advanced | Implementation of Promises/Futures that are durable across processes and failures. |
| Patterns | Priority Queue | [code](priorityqueue) | [README](#pattern-priority-queue) | Advanced | Example of implementing a priority queue to manage task execution order. |

## Integrations

Expand Down
Loading

0 comments on commit e191908

Please sign in to comment.