diff --git a/docs/concepts/deployments.mdx b/docs/concepts/deployments.mdx new file mode 100644 index 00000000..6af1bb79 --- /dev/null +++ b/docs/concepts/deployments.mdx @@ -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 + diff --git a/docs/concepts/durable_promises.mdx b/docs/concepts/durable_promises.mdx new file mode 100644 index 00000000..f5378121 --- /dev/null +++ b/docs/concepts/durable_promises.mdx @@ -0,0 +1,7 @@ +--- +sidebar_position: 5 +description: "" +draft: "true" +--- + +# Durable Promises \ No newline at end of file diff --git a/docs/concepts/durable_timers.mdx b/docs/concepts/durable_timers.mdx new file mode 100644 index 00000000..22587905 --- /dev/null +++ b/docs/concepts/durable_timers.mdx @@ -0,0 +1,12 @@ +--- +sidebar_position: 6 +description: "" +draft: "true" +--- + + +# Durable Timers & Scheduling + +- Durable sleep +- Delayed calls +- Scheduling diff --git a/docs/concepts/integrating_external_systems.mdx b/docs/concepts/integrating_external_systems.mdx new file mode 100644 index 00000000..e2faae43 --- /dev/null +++ b/docs/concepts/integrating_external_systems.mdx @@ -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 + + diff --git a/docs/concepts/invocations.mdx b/docs/concepts/invocations.mdx new file mode 100644 index 00000000..bc5b6b9f --- /dev/null +++ b/docs/concepts/invocations.mdx @@ -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 + + diff --git a/docs/concepts/lambda_suspendable_tasks.mdx b/docs/concepts/lambda_suspendable_tasks.mdx new file mode 100644 index 00000000..93cc447e --- /dev/null +++ b/docs/concepts/lambda_suspendable_tasks.mdx @@ -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 + + + + + diff --git a/docs/concepts/restate_in_your_stack.mdx b/docs/concepts/restate_in_your_stack.mdx new file mode 100644 index 00000000..3084dc57 --- /dev/null +++ b/docs/concepts/restate_in_your_stack.mdx @@ -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/) + + + diff --git a/docs/concepts/state.mdx b/docs/concepts/state.mdx new file mode 100644 index 00000000..f4d6e254 --- /dev/null +++ b/docs/concepts/state.mdx @@ -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 diff --git a/sidebars.js b/sidebars.js index d4e2a854..71d5933a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -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;