Skip to content

Commit 8130535

Browse files
committed
Improve Typescript pattern readme
1 parent 61c8b4a commit 8130535

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

typescript/patterns-use-cases/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ Common tasks and patterns implemented with Restate:
44

55
**Basics:**
66

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

1818
**Intermediate:**
1919

20-
| Use case / Pattern | | | Description |
21-
|--------------------------------------------------------|---------------------------------------------------------|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
22-
| Parallelizing work | [code](src/parallelizework/fan_out_worker.ts) | [README](README.md#parallelizing-work) | Execute a list of tasks in parallel and then gather their result. |
23-
| Turn slow sync tasks into async | [code](src/dataupload/client.ts) | [README](README.md#async-data-upload) | Kick of a synchronous task (e.g. data upload) and turn it into an asynchronous one if it takes too long. |
20+
| Use case / Pattern | Description |
21+
|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
22+
| [Parallelizing work](README.md#parallelizing-work) | Execute a list of tasks in parallel and then gather their result. [(code)](src/parallelizework/fan_out_worker.ts) |
23+
| [Turn slow sync tasks into async](README.md#async-data-upload) | Kick off a synchronous task (e.g. data upload) and turn it into an asynchronous one if it takes too long. [(code)](src/dataupload/client.ts) |
2424

2525
**Advanced:**
2626

27-
| Use case / Pattern | | | Description |
28-
|----------------------------------------------------------------|---------------------------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
29-
| Payment state machines | [code](src/statemachinepayments/payment_service.ts) | [README](README.md#payment-state-machine) | State machine example that tracks a payment process, ensuring consistent processing and cancellations. |
30-
| Payments signals | [code](src/signalspayments/payment_service.ts) | [README](README.md#payment-signals---combining-sync-responses-and-async-webhook-callbacks-from-stripe) | Combining fast synchronous responses and slow async callbacks for payments, with Stripe. |
31-
| Patterns: Durable Promises | [code](durablepromise) | [README](README.md#pattern-durable-promises) | Custom implementation of Promises/Futures that are durable across processes and failures. |
32-
| Patterns: Priority Queue | [code](priorityqueue) | [README](README.md#pattern-priority-queue) | Example of implementing a priority queue to manage task execution order. |
27+
| Use case / Pattern | Description |
28+
|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
29+
| [Payment state machines](README.md#payment-state-machine) | State machine example that tracks a payment process, ensuring consistent processing and cancellations. [(code)](src/statemachinepayments/payment_service.ts) |
30+
| [Payments signals](README.md#payment-signals---combining-sync-responses-and-async-webhook-callbacks-from-stripe) | Combining fast synchronous responses and slow async callbacks for payments, with Stripe. [(code)](src/signalspayments/payment_service.ts) |
31+
| [Patterns: Durable Promises](README.md#pattern-durable-promises) | Custom implementation of Promises/Futures that are durable across processes and failures. [(code)](durablepromise) |
32+
| [Patterns: Priority Queue](README.md#pattern-priority-queue) | Example of implementing a priority queue to manage task execution order. [(code)](priorityqueue) |
3333

3434
First, install the dependencies:
3535

0 commit comments

Comments
 (0)