GithubHelp home page GithubHelp logo

uurl / restate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from restatedev/restate

0.0 0.0 0.0 2.69 MB

Restate server and CLI

Home Page: https://docs.restate.dev

License: Other

Shell 0.03% Lua 0.15% Rust 99.47% Dockerfile 0.10% Just 0.25%

restate's Introduction

Documentation Discord Twitter

Restate - Building resilient applications made easy!

Restate is a system for easily building resilient applications using distributed durable async/await. This repository contains the Restate server and CLI.

The basic primitives Restate offers to simplify application development are the following:

  • reliable execution: user code will always run to completion. Intermediate failures result in re-tries that use the durable execution mechanism to recover partial progress and not duplicate already executed steps.
  • suspending user code: long-running user code suspends when awaiting on a promise and resume when that promise is resolved.
  • reliable communication: user code communicates with exactly-once semantics. Restate reliably delivers messages and anchors both sender and receiver in the durable execution to ensure no losses or duplicates can happen.
  • durable timers: user code can sleep (and suspend) or schedule calls for later.
  • isolation: user code can be keyed, which makes Restate scheduled them to obey single-writer-per-key semantics.
  • consistent state: keyed user code can attach key/value state, which is eagerly pushed into handlers during invocation, and written back upon completion. This is particularly efficient for FaaS deployments (stateful serverless, yay!).
  • observability & introspection: Restate automatically generates Open Telemetry traces for the interactions between handlers and gives you a SQL shell to query the distributed state of the application.

Check our GitHub org or the docs for further details.

SDKs

Restate supports the following SDKs:

Building Restate

In order to build Restate locally follow the build instructions.

Running Restate

You can start the runtime via:

just run --bin restate-server --release

or the latest release via docker:

docker run --name restate --rm --network=host docker.io/restatedev/restate

In order to change the log level, configure the RUST_LOG env variable respectively. For example, to enable debug mode for Restate crates:

RUST_LOG=info,restate=debug just run --bin restate-server --release

Registering Restate services

After the runtime is running on localhost:9070, you can register a service running on localhost:9080 via curl:

curl -X POST localhost:9070/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:9080"}'

For more information check how to register services.

Invoking a Restate service

After registering a service you can invoke a service via via HTTP/JSON:

curl -X POST localhost:8080/counter.Counter/GetAndAdd -H 'content-type: application/json' -d '{"counter_name": "foobar", "value": 10 }'

For more information check how to invoke services.

restate's People

Contributors

tillrohrmann avatar slinkydeveloper avatar jackkleeman avatar ahmedsoliman avatar igalshilman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.