go get github.com/jennal/goplay
Before you run this server, you need to get master server and connector server started.
go install github.com/jennal/goplay-master
$GOPATH/bin/goplay-master
go install github.com/jennal/goplay-connector
$GOPATH/bin/goplay-connector
go run echo-cluster/server/main.go
go run echo-cluster/client/main.go
Now every line you input to terminal will notify & request to server, and server will push & response back the same line.
You may notice that all the code in echo/client/main.go
and echo-cluster/client/main.go
are almost same. The only different is the port client connected. echo/client/main.go
connect to echo server directly, and echo-cluster/client/main.go
connect to connector server
instead.