純go實現的im即時通信系統,各層可單獨部署,之間經過rpc通信,支持集羣,github地址 https://github.com/Terry-Ye/im , 學習於goim, 總分三層,git
如下Comet 層,Logic 層,Job層均可以靈活擴展機器github
go get -u github.com/Terry-Ye/im mv $GOPATH/src/github.com/Terry-Ye/im $GOPATH/src/im cd $GOPATH/src/im go get ./...
golang.org 包拉不下來的狀況,例golang
package golang.org/x/net/ipv4: unrecognized import path "golang.org/x/net/ipv4" (https fetch: Get https://golang.org/x/net/ipv4?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
從github 拉下來,再移動位置web
git clone https://github.com/golang/net.git mkdir -p golang.org/x/ mv net $GOPATH/src/golang.org/x/
安裝comet、logic、job模塊redis
cd $GOPATH/src/im/comet go install cd ../logic/ go install cd ../job go install nohup $GOPATH/bin/logic -d $GOPATH/src/im/logic/ 2>&1 > /data/log/im/logic.log & nohup $GOPATH/bin/comet -d $GOPATH/src/im/comet/ 2>&1 > /data/log/im/comet.log & nohup $GOPATH/bin/job -d $GOPATH/src/im/job/ 2>&1 > /data/log/im/job.log &
聊天室:http://www.texixi.com:1999/api