Skip to content

Commit

Permalink
Improve Typescript pattern readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Jan 7, 2025
1 parent afc40ce commit 4d52096
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions typescript/patterns-use-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ Common tasks and patterns implemented with Restate:

**Basics:**

| Use case / Pattern | Code | README | Description |
|------------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Durable RPC, Idempotency and Concurrency | [code](src/durablerpc/express_app.ts) | [README](README.md#durable-rpc-idempotency-and-concurrency) | Use the programmatic clients to call Restate handlers. Add idempotency keys for deduplication. |
| (Delayed) Message Queue | [code](src/queue/task_submitter.ts) | [README](README.md#delayed-message-queue) | Use Restate as a queue. Send a (delayed) event to a handler. Optionally, retrieve the response later. |
| Sagas | [code](src/sagas/booking_workflow.ts) | [README](README.md#sagas) | Preserve consistency by tracking undo actions and running them when code fails halfway through. Restate guarantees completion. |
| Webhook Event Processing | [code](src/webhookcallbacks/webhook_callback_router.ts) | [README](#durable-webhook-event-processing) | Point webhook callbacks to a Restate handler for durable event processing. |
| Scheduling Tasks | [code](src/schedulingtasks/payment_reminders.ts) | [README](#scheduling-tasks-and-durable-webhooks) | Use Restate as scheduler. Schedule tasks for later and ensure the task is triggered and executed. |
| Stateful Actors and State Machines | [code](src/statefulactors/machine_operator.ts) | [README](README.md#stateful-actors-and-durable-state-machines) | Stateful Actor representing a machine in our factory. The handlers bring the machine up and down and track the state transitions, built as a Restate Virtual Object for automatic state persistence. |
| Event processing: Transactional handlers | [code](src/eventtransactions/user_feed.ts) | [README](README.md#event-processing-transactional-handlers-with-durable-side-effects-and-timers) | Processing events (from Kafka) to update various downstream systems in a transactional way. With durable side effects and timers. |
| Event processing: Enriching streams | [code](src/eventenrichment/package_tracker.ts) | [README](README.md#event-processing-event-enrichment) | Stateful functions/actors connected to Kafka and callable over RPC. |

| Use case / Pattern | Code | README | Description |
|----------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| Durable RPC, Idempotency & Concurrency | [code](src/durablerpc/express_app.ts) | [README](README.md#durable-rpc-idempotency-and-concurrency) | Use programmatic clients to call Restate handlers. Add idempotency keys for deduplication. |
| (Delayed) Message Queue | [code](src/queue/task_submitter.ts) | [README](README.md#delayed-message-queue) | Restate as a queue: Send (delayed) events to handlers. Optionally, retrieve the response later. |
| Sagas | [code](src/sagas/booking_workflow.ts) | [README](README.md#sagas) | Preserve consistency by tracking undo actions and running them when code fails halfway through. |
| Webhook Callbacks | [code](src/webhookcallbacks/webhook_callback_router.ts) | [README](#durable-webhook-event-processing) | Point webhook callbacks to a Restate handler for durable event processing. |
| Scheduling Tasks | [code](src/schedulingtasks/payment_reminders.ts) | [README](#scheduling-tasks-and-durable-webhooks) | Restate as scheduler: Schedule tasks for later and ensure the task is triggered and executed. |
| Stateful Actors and State Machines | [code](src/statefulactors/machine_operator.ts) | [README](README.md#stateful-actors-and-durable-state-machines) | Stateful Actor representing a machine in our factory. Track state transitions with automatic state persistence. |
| Transactional Event Processing | [code](src/eventtransactions/user_feed.ts) | [README](README.md#event-processing-transactional-handlers-with-durable-side-effects-and-timers) | Process events from Kafka to update various downstream systems in a transactional way. |
| Event enrichment / Joins | [code](src/eventenrichment/package_tracker.ts) | [README](README.md#event-processing-event-enrichment) | Stateful functions/actors connected to Kafka and callable over RPC. |
**Intermediate:**

| Use case / Pattern | | | Description |
Expand Down

0 comments on commit 4d52096

Please sign in to comment.