repository
0.0.0-20210103032733-25c693f07805
Repository: https://github.com/distalchemist/mongongo.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
Mongongo
Cassandra in Go.
Getting Started
- Install Go 1.15
- Enable Go module and Setup Go package proxy
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.io,direct
- Download
First setup your Go project structure, put the following into your ~/.bashrc
:
export GOPATH=~/projects/go # any where you like, except $GOROOT
export mg=$GOPATH/src/github.com/DistAlchemist
Then make directories:
$ mkdir -p $mg
$ cd $mg
$ git clone https://github.com/DistAlchemist/Mongongo.git
# or git clone [email protected]:DistAlchemist/Mongongo.git
$ cd Mongongo
- Setup tmux for multi-terminal (recommended)
$ sudo apt install tmux
- Create a new session of tmux:
$ tmux new -s mg
- Build files:
$ cd $mg
$ cd Mongongo
$ make
- Inside one terminal, run Mongongo server:
$ bin/mg-server
- Inside another terminal, run command line interface:
$ bin/cli
- To start servers on multiple nodes:
$ sudo chmod +x startallpeers.sh
$ ./startallpeers.sh
- To stop servers on multiple nodes:
$ sudo chmod +x stopallpeers.sh
$ ./stopallpeers.sh
Design
-
The design mostly follows the very early version of Cassandra
-
Currently only simple
SET
andGET
operation is supported:
SET table1.standardCF1['row1']['column1']='value'
GET table1.standardCF1['row1']['column1']
-
The project is roughly divided into three layers:
- Command Line Interface (parse SQL to command)
- Mongongo Server (determine which nodes need to perform the operation, send the operation to their storage layer)
- Storage Layer (perform specific operation, update commitLog, memTable, ssTable etc.)
-
TODO
- Add more tests.
- Strengthen QL support.
Contributing
- See CONTRIBUTING
Example
License
MIT License