Run and scale realtime applications with Rivet Actors

Run and scale realtime applications with Rivet Actors

Visit Site

This is a documentation repository for the Rivet project, a open-source Actor-based system for building scalable and fault-tolerant applications.

Table of Contents

  1. Introduction
  2. Getting Started
  3. Core Technologies
  4. Architecture Diagram
  5. Project Layout
  6. License

Introduction

Rivet is an open-source Actor-based system for building scalable and fault-tolerant applications. It provides a set of tools, libraries, and frameworks for developers to build and deploy their applications on a cloud-native infrastructure.

Getting Started

To get started with Rivet, follow these steps:

  1. Install the Rust compiler: Download and install the Rust compiler from the official website.
  2. Create a new project: Create a new directory for your project and initialize it with cargo init.
  3. Add the Rivet dependencies: Add the following dependencies to your Cargo.toml file:
[dependencies]
rivet = "1.0.0"
  1. Import the Actor runtime: Import the Actor runtime in your Rust code:
use rivet::actor;

Core Technologies

Rivet uses a set of core technologies to provide its functionality:

  • V8 & Deno: Rivet uses the V8 and Deno JavaScript runtimes as its isolate runtime.
  • FoundationDB: Rivet uses FoundationDB as its actor state database.
  • CockroachDB: Rivet uses CockroachDB as its OLTP database.
  • ClickHouse: Rivet uses ClickHouse as its developer-facing monitoring system.
  • Valkey: Rivet uses Valkey as its caching layer.

Architecture Diagram

The Rivet architecture diagram is shown below:

+---------------+
|  Load Balancer  |
+---------------+
          |            |
          |  Ingress    |
          v            v
+---------------+       +---------------+
|  App Server   |       |  Actor Runtime  |
+---------------+       +---------------+
          |            |            |
          |  Communication |            |
          v            v            v
+---------------+       +---------------+
|  Actor Cluster |       |  Database     |
+---------------+       +---------------+
          |            |
          |  State Store   |
          v            v
+---------------+       +---------------+
|  Actor Runtime |       |  Monitoring    |
+---------------+       +---------------+

Project Layout

The Rivet project layout is organized as follows:

docker/
client/
dev-full/
monolith/
server/
docs/
docs-internal/
examples/
packages/
api/
common/
infra/
services/
toolchain/
resources/
scripts/
sdks/
actor/
api/

License

Rivet is licensed under the Apache 2.0 license.

 Apache 2.0 License

Copyright (c) [Year] [Author]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.