Skip to content

Repository files navigation

Arcus

Introduction

Serverless functions are stateless by design, but stateful workloads require durable, low-latency access to shared state across invocations. Arcus is a distributed function state I/O substrate that bridges this gap through log and cache co-design. By co-designing the log and cache layers, Arcus delivers both fast and reliable state access for stateful serverless functions. Clients interact with Arcus through a thin SDK over gRPC/bRPC.

This repository contains the reference implementation of the Arcus server-side components and client SDK.

Prerequisites

System packages (Ubuntu / Debian)

sudo apt update
sudo apt install -y \
    git build-essential cmake \
    libssl-dev libgflags-dev \
    libprotobuf-dev libprotoc-dev protobuf-compiler \
    libleveldb-dev libsnappy-dev \
    libzookeeper-mt-dev libyaml-cpp-dev \
    libcurl4-openssl-dev

AWS SDK for C++

The cache server can load data from DynamoDB. Build and install the SDK from source:

git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
cd aws-sdk-cpp
mkdir build && cd build
cmake -DBUILD_ONLY="dynamodb" -DENABLE_TESTING=OFF ..
make -j"$(nproc)"
sudo make install

Other requirements

Tool Version Purpose
CMake ≥ 3.12 Build system
GCC / Clang C++17-capable Compilation
Docker any recent Running ZooKeeper
Protocol Buffers matches libprotobuf-dev RPC schema

Build

1. Clone the repository

git clone --recursive https://github.com/CGCL-codes/Arcus.git
cd Arcus

The --recursive flag is required to fetch the third-party dependencies (brpc, rocksdb, spdlog, libcuckoo, aws-sdk-cpp).

2. Build third-party dependencies

./build_deps.sh

This script:

  • Skips the AWS SDK build if libaws-cpp-sdk-dynamodb.so is already installed system-wide.
  • Builds and installs other required third-party dependencies into third_party/build/.

To build dependencies with debug symbols:

./build_deps.sh --debug

3. Generate protobuf bindings

./compile_proto.sh

This compiles every .proto file under protobuf/ into:

  • src/proto/*.pb.{h,cc} — C++ server-side bindings
  • client/golang/proto/ — Go bindings

4. Compile Arcus

mkdir build && cd build
cmake ..
make -j"$(nproc)"

The build produces three binaries log_server directory_server cache_server in build/.

Running

1. Start ZooKeeper

ZooKeeper is used for components coordination.

docker run -d --name zookeeper --net=host zookeeper:latest

If you already have a ZooKeeper installed locally, you can skip this step.

2. Start the Arcus services

In three separate terminals:

./build/log_server      config/log.yml
./build/directory_server config/directory.yml
./build/cache_server    config/cache.yml

Configuration files live under config/. Edit them to adjust listening ports or other configurations before launching.

Project Layout

Arcus/
├── CMakeLists.txt          # Top-level CMake build
├── build_deps.sh           # Third-party dependency builder
├── compile_proto.sh        # Protobuf generator (C++ & Go)
├── config/                 # YAML configs
├── protobuf/               # .proto schema definitions
├── src/
│   ├── common/             # Shared utilities
│   ├── log/                # Log server
│   ├── directory/          # Directory server
│   ├── cache/              # Cache server
│   ├── database/           # DynamoDB persistence backend
│   ├── view/               # Coordination helpers
│   ├── client/             # Client SDK glue
│   ├── utils/              # Misc helpers
│   └── proto/              # Generated C++ bindings
├── client/
│   └── golang/             # Go SDK + generated proto bindings
└── third_party/            # third party dependencies

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages