Cirno is a stand alone application to generate unique ID.
$ telnet localhost 11212
Trying ::1...
Connected to localhost.
Escape character is '^]'.
GET new
VALUE new 0 20
bejajfghs7icvi3okm70
END
Build from source code.
$ go get github.com/sairoutine/cirno
$ cd $GOPATH/github.com/sairoutine/cirno
$ go install
$ cd $GOPATH/github.com/sairoutine/cirno/cmd/cirno_server
$ go build
$ # tcp
$ ./cirno_server -port=7238
$ # unix domain socket
$ ./cirno_server -sock=/path/to/unix-domain.sock
Cirno uses the protocol which is compatible with memcached.
GET id1 id2
VALUE id1 0 20
bejajfghs7icvi3okm70
VALUE id2 0 20
bejajfghs7icvi3okm71
END
VALUE(s) are unique IDs.
Returns a version of Cirno.
VERSION
VERSION 1.0.0
Disconnect the established connection.
Cirno uses xid algorithm to generate ID. Xid is alod used also Mongo Object ID algorithm.
Optional.
Port number used for connection.
Default value is 11212
.
Optional. Path of unix doamin socket.
Optional.
Connection idle timeout in seconds.
0
means infinite.
Default value is 5
.
# benchmark
go test -bench . -benchmem -benchtime 30s -v ./cmd/cirno_server