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.
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-devThe 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| 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 |
git clone --recursive https://github.com/CGCL-codes/Arcus.git
cd ArcusThe --recursive flag is required to fetch the third-party dependencies (brpc, rocksdb, spdlog, libcuckoo, aws-sdk-cpp).
./build_deps.shThis script:
- Skips the AWS SDK build if
libaws-cpp-sdk-dynamodb.sois 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./compile_proto.shThis compiles every .proto file under protobuf/ into:
src/proto/*.pb.{h,cc}— C++ server-side bindingsclient/golang/proto/— Go bindings
mkdir build && cd build
cmake ..
make -j"$(nproc)"The build produces three binaries log_server directory_server cache_server in build/.
ZooKeeper is used for components coordination.
docker run -d --name zookeeper --net=host zookeeper:latestIf you already have a ZooKeeper installed locally, you can skip this step.
In three separate terminals:
./build/log_server config/log.yml
./build/directory_server config/directory.yml
./build/cache_server config/cache.ymlConfiguration files live under config/. Edit them to adjust listening ports or other configurations before launching.
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