-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/issue266' into issue266
# Conflicts: # docs/concepts/durable_execution.mdx # docs/concepts/services_workflows_virtual_objects.mdx # sidebars.js
- Loading branch information
Showing
9 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
sidebar_position: 10 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
# Deployments & Versions | ||
|
||
Visualization of the service deployment hierarchy: | ||
|
||
## Deployments | ||
= A deployment hosts a given revision of one or more RPC services. | ||
Deployments are immutable by default, to update a service, the user must register a new deployment. | ||
|
||
- Revisions / Versions | ||
- Endpoints | ||
|
||
Types of deployments: | ||
- Restate Lambda Handler | ||
- Restate HTTP deployment endpoint | ||
|
||
Refer to other page on Lambda for more info on how they execute differently. | ||
|
||
## Versioning | ||
Explain how versioning Restate applications works | ||
|
||
Versioning works very well with Lambda. | ||
No cost for keeping around old versions, just a file somewhere. | ||
|
||
Invocation gets retried on same version | ||
|
||
You can find info on draining in CLI | ||
|
||
## Scaling and load balancing | ||
- Lambda & Knative | ||
- Kubernetes autoscaling | ||
- L7 load balancing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
# Durable Promises |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
sidebar_position: 6 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
|
||
# Durable Timers & Scheduling | ||
|
||
- Durable sleep | ||
- Delayed calls | ||
- Scheduling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
sidebar_position: 8 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
|
||
# Push vs. pull model | ||
|
||
|
||
There are a few ways you can leverage Restate in external systems or facilitate communication between them and your Restate application. | ||
|
||
Visualization showing the different options | ||
|
||
|
||
## Embedding Restate handlers in other systems | ||
|
||
|
||
Refer to guide on gradual adoption with Restate | ||
|
||
## Synchronous interaction via side effects | ||
Wrapping HTTP calls in side effects | ||
|
||
Generation of idempotency keys | ||
|
||
|
||
## Asynchronous interaction via awakeables | ||
Visualization of how awakeables work | ||
|
||
sharedPromises | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 4 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
|
||
# Durable RPC | ||
|
||
Two main type of invocations: inbound invocations and service-to-service invocations. | ||
|
||
## Inbound invocations | ||
- gRPC | ||
- HTTP | ||
- Kafka | ||
|
||
### One-way inbound invocation | ||
|
||
### Idempotent invocations | ||
- gets executed exactly-once | ||
- latch on later to continue waiting for the response or to get the result if finished | ||
|
||
### Invocation ID | ||
|
||
## Service-to-service invocations | ||
- one-way calls | ||
- request-response calls | ||
- delayed calls | ||
|
||
|
||
## Inspecting invocations | ||
- CLI | ||
Show some useful commands to debug a specific invocation | ||
- Tracing | ||
|
||
## Cancelling invocations | ||
Refer to blog post on compensations (https://restate.dev/blog/graceful-cancellations-how-to-keep-your-application-and-workflow-state-consistent/) | ||
|
||
## Killing invocations | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 7 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
# Serverless Functions | ||
|
||
Restate works well with AWS Lambda because: | ||
link to website page on AWS Lambda workflows and blog post | ||
https://restate.dev/blog/we-replaced-400-lines-of-stepfunctions-asl-with-40-lines-of-typescript-by-making-lambdas-suspendable/ | ||
|
||
## Suspensions | ||
- What are they | ||
- How do they work | ||
|
||
|
||
## Lambda workflows as code | ||
Long-running workflows become possible | ||
- Lambda functions calling other Lambda functions | ||
- Lambda functions sleeping/waiting for arbitrarily long time | ||
|
||
No need for workflow orchestrators | ||
|
||
## Deployment | ||
### Restate Cloud | ||
|
||
|
||
### CDK | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
# Restate Application | ||
- Explains the most important terms: *Restate server, services, invocation, CLI* | ||
- Shows a diagram of how things tie together | ||
- Restate sits in between services | ||
- Services can either be Restate services or embedded handlers in "external" services | ||
- Services can communicate with each other via RPC, or with the outside world via awakeables, and side effects | ||
- Restate services have the Restate SDK embedded in them, which handles the communication with the Restate server (to invoke a function, to log progress, to send back the response, etc.) | ||
|
||
Restate Server has two endpoints: | ||
- Admin server: CLI, registration, etc. | ||
- Ingress: for invocations | ||
|
||
link to more detailed page on Architecture (explaining node/worker/meta/ingress/admin servers/) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 9 | ||
description: "" | ||
draft: "true" | ||
--- | ||
|
||
# State | ||
|
||
:::danger | ||
State is only available in Virtual Objects and workflows. | ||
::: | ||
|
||
Only K/V | ||
|
||
Stored in Restate in RocksDB | ||
|
||
State is attached to the incoming request | ||
|
||
## Scope of state | ||
|
||
- Per-key in virtual objects. | ||
- Per workflow execution for workflows. | ||
|
||
## Concurrent state queries | ||
Read-only methods with shared context | ||
|
||
|
||
## Inspecting state | ||
- CLI | ||
- psql | ||
|
||
|
||
## Modifying state | ||
- CLI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters