The sequence ID is designed to generate sequential ID for no-sql applications.
gRPC protocol is used to provide high efficiency network communication.
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/go-sql-driver/mysql
go get github.com/c9s/sid/cmd/sidserver
To setup the sid generator, you need few things:
- DSN for MySQL server
- The keys of the sequences.
You need to create a config file like this:
{
"backend": {
"mysql": {
"dsn": "root@unix(/opt/local/var/run/mysql57/mysqld.sock)/sid"
}
},
"sequences": {
"jobs": {},
"orders": {}
}
}
Simply run the following commands to run the server:
sid-server -config config.json
MIT License
Yo-An Lin yoanlin93@gmail.com