Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue266' into issue266
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/concepts/durable_execution.mdx
#	docs/concepts/services_workflows_virtual_objects.mdx
#	sidebars.js
  • Loading branch information
gvdongen committed Mar 25, 2024
2 parents e2d5c5c + f83324a commit 80646ab
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/concepts/deployments.mdx
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

7 changes: 7 additions & 0 deletions docs/concepts/durable_promises.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 5
description: ""
draft: "true"
---

# Durable Promises
12 changes: 12 additions & 0 deletions docs/concepts/durable_timers.mdx
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
32 changes: 32 additions & 0 deletions docs/concepts/integrating_external_systems.mdx
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


41 changes: 41 additions & 0 deletions docs/concepts/invocations.mdx
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


34 changes: 34 additions & 0 deletions docs/concepts/lambda_suspendable_tasks.mdx
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





22 changes: 22 additions & 0 deletions docs/concepts/restate_in_your_stack.mdx
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/)



34 changes: 34 additions & 0 deletions docs/concepts/state.mdx
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
14 changes: 14 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ const sidebars = {
{type: 'autogenerated', dirName: 'references'},
]},
],


// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

module.exports = sidebars;

0 comments on commit 80646ab

Please sign in to comment.