Skip to content
dongmao zhang edited this page Mar 2, 2022 · 7 revisions

Welcome to the Autumn wiki!

Autumn is a distributed key/value storage where keys and values could be arbitrary bytes system. the key should be less than 512 bytes and the value should be less than 64MB. The architecture is based on paper Windows Azure Storage

Check Basic Operations and Architecture

Getting Started

Build

make

will generate several binaries in the cmd directory.

  1. extent-node maintains the storage for a set of extent replicas assigned to it by the autumn-manager. An EN has N disks attached, which it completely controls for storing extent replicas and their block. extent-node works in stream-layer.

  2. autumn-manager keeps track of the stream namespace, what extents are in each stream, and the extent allocation across the Extent Nodes (EN) , while it is also responsible for keeping track of and splitting the massive Object Tables into RangePartitions and assigning each RangePartition to a Partition Server to serve access to the objects. autumn-manager is an embeded ETCD instance which also support lock services. autumn-manager works in both stream-layer and partition-layer.

  3. autumn-ps is responsible for serving requests to a set of RangePartitions assigned to it by the PM. The PS stores all the persistent state of the partitions into streams and maintains a memory cache of the partition state for efficiency

  4. autumn-client is a command line tool to interact with autumn system which supports put object or get object, etc

  5. debug-tools and stream-client is for local testing.

Run Autumn on a single node

we create a 4-nodes cluster for local testing.

Install goreman

go get github.com/mattn/goreman

and add $GOPATH/bin in PATH

start autumn-manager

goreman start

or run cmd

./autumn-manager --dir sm1.db --name sm1 --listen-client-urls http://127.0.0.1:2379 --advertise-client-urls http://127.0.0.1:2379 --listen-peer-urls http://127.0.0.1:12380  --advertise-peer-urls http://127.0.0.1:12380 --initial-cluster-token sm-cluster-1 --initial-cluster 'sm1=http://127.0.0.1:12380' --initial-cluster-state new --listen-grpc 127.0.0.1:3401

autumn-manager is an embedded ETCD which has the same parameters as ETCD except the "--listen-grpc". "--listen-grpc" is used by StreamManager to accept stream-layer's request. If any error happens, check autumn-manager's log file: manager.log

all persist data of autumn-manager is in "sm1.db".

setup extent_node and start

After autumn-manager is started.

make format

This will simulate that 4 nodes are created for this cluster. Each node has its own data directory:("store1", "store2", "store3" and "store4"). autumn-client will format the data directory and register the data directories on autumn-manager.

After each node's directories is registered, autumn-client will generate a config file .toml for each node.

For example: local "store1" is registered as ID is 1, its directories are "sda" and "sdb"

ID = 1
ListenUrl = "127.0.0.1:4001"
Dirs = ["store1/sda", "store1/sdb"]
WalDir = "store1/wal"

Run

goreman start

to start these 4 nodes.

start autumn-ps

goreman start

or

./autumn-ps --listen 127.0.0.1:9951 --psID 10 --smAddr 127.0.0.1:3401 --etcdAddr 127.0.0.1:2379

It will connect to localhost's autumn-manager and register itself as PSID 10.

bootstrap cluster and put/get object

cd cmd/autumn-client
./autumn-client bootstrap --replication 2+1

this will create the first Partition for this cluster. autumn-manager will deploy this Partition on any PartitionServer and split partition automatically

Debug-tools

Etcdviewer

Etcdviewer is used to look up the internal data structure of StreamManager and PartitionManager. Etcdviewer requires fyne, if it is build in ubuntu, install package libgl1-mesa-dev first

Validblock