moby--moby/libnetwork/test/networkDb
Flavio Crisciani 8c31217a44 NetworkDB create NodeID for cluster nodes
Separate the hostname from the node identifier. All the messages
that are exchanged on the network are containing a nodeName field
that today was hostname-uniqueid. Now being encoded as strings in
the protobuf without any length restriction they plays a role
on the effieciency of protocol itself. If the hostname is very long
the overhead will increase and will degradate the performance of
the database itself that each single cycle by default allows 1400
bytes payload

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-09-26 10:48:04 -07:00
..
dbclient Changed ReapTable logic 2017-09-21 09:37:47 -07:00
dbserver NetworkDB create NodeID for cluster nodes 2017-09-26 10:48:04 -07:00
dummyclient Update logrus to v1.0.1 2017-08-07 11:20:47 -07:00
Dockerfile NetworkDB testing infra 2017-07-27 08:50:43 -07:00
README Changed ReapTable logic 2017-09-21 09:37:47 -07:00
testMain.go Update logrus to v1.0.1 2017-08-07 11:20:47 -07:00

README

SERVER

cd test/networkdb
env GOOS=linux go build -v testMain.go && docker build -t fcrisciani/networkdb-test .
(only for testkit case) docker push fcrisciani/networkdb-test

Run server: docker service create --name testdb --network net1 --replicas 3 --env TASK_ID="{{.Task.ID}}" -p mode=host,target=8000 fcrisciani/networkdb-test server 8000

CLIENT

cd test/networkdb
Join cluster: docker run -it --network net1 fcrisciani/networkdb-test client join testdb 8000
Join network: docker run -it --network net1 fcrisciani/networkdb-test client join-network testdb 8000 test
Run test: docker run -it --network net1 fcrisciani/networkdb-test client write-delete-unique-keys testdb 8000 test tableBla 3 10
check table: curl "localhost:32768/gettable?nid=test&tname=table_name"