-
Notifications
You must be signed in to change notification settings - Fork 4
Home
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
make
will generate several binaries in the cmd
directory.
-
extent-node
maintains the storage for a set of extent replicas assigned to it by theautumn-manager
. An EN has N disks attached, which it completely controls for storing extent replicas and their block.extent-node
works in stream-layer. -
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 embededETCD
instance which also support lock services.autumn-manager
works in both stream-layer and partition-layer. -
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 -
autumn-client
is a command line tool to interact withautumn
system which supportsput object
orget object
, etc -
debug-tools
andstream-client
is for local testing.
we create a 4-nodes cluster for local testing.
Install goreman
go get github.com/mattn/goreman
and add $GOPATH/bin in PATH
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".
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.
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.
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
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