gobelieveio / im_service Goto Github PK
View Code? Open in Web Editor NEWgolang im server
License: GNU General Public License v2.0
golang im server
License: GNU General Public License v2.0
1)im,imr,ims,lru几个目录简单说明,从名字不容易看出来
2)im_sevice目录下的多个文件,与im,imr,ims目录里面都有重复的,为什么不放进去?
3)还继续更新吗?
官网给的js版的接口文档,没有接口名称,输入输出参数,,,请问这怎么使用,,,你们是在逗比吗?
dep 有点过时了。而且 下载不下来。
我在墙内,没办法通过 dep ensure 解决依赖,我将所有的依赖包都从github下载到了本地,但是在执行 make install 的时候报错。 报错如下:
make install
cd im && make
make[1]: 进入目录“/usr/local/golang/src/github.com/GoBelieveIO/im_service/im”
go build -ldflags "-X main.VERSION=2.0.0 -X 'main.BUILD_TIME=date
' -X 'main.GO_VERSION=go version
' -X 'main.GIT_COMMIT_ID=git log --pretty=format:"%h" -1
' -X 'main.GIT_BRANCH=git rev-parse --abbrev-ref HEAD
'" -o im im_server.go im.go subscriber.go connection.go client.go peer_client.go group_client.go room_client.go customer_client.go route.go app_route.go protocol.go message.go group_manager.go group.go set.go config.go monitoring.go sio.go storage_rpc.go channel.go storage_message.go route_message.go user.go rpc.go dummy_grpc.go device.go group_message_deliver.go relationship.go relationship_pool.go
./sio.go:93:28: undefined: engineio.MessageBinary
./sio.go:117:10: undefined: engineio.MessageText
make[1]: *** [im] 错误 2
make[1]: 离开目录“/usr/local/golang/src/github.com/GoBelieveIO/im_service/im”
make: *** [im_bin] 错误 2
代码内函数重复冲突。。
您好,东西挺好的,能不能把目录结构加上,要不然看起开很难受呀
engineio 包下没有这个MessageBinary和MessageText
请问那要怎样用呢?
Can we build a image use docker
Dockerfile? Then, The deployment will be easily.
安卓客户端偶尔发送连续重复消息,但是前端只显示一条,后端会收到多条一样的消息落库
我看到readme文件不久前删除了./im_api api.cfg,而且之前也找不到im_api相关的编译规则,是不是这块代码没上传?
怎么集群部署?文档有点太简陋了🥺
在app_route.go文件中第26行的Route指针没有声明,编译器报错!
注意到在IM实例处理client发来的 MSG_IM
时会同时投递 MSG_IM
和 MSG_SYNC_NOTIFY
至接收方和client其他登陆点,目的似乎是为了保证各消息接收点的消息时序一致性,在这里既发送MSG_IM
又发送 MSG_SYNC_NOTIFY
的方式是否显得冗余:
1、IM实例处理 MSG_IM 时是否可以仅发送MSG_IM,让接收消息的终端自己根据msgid判断是否向服务器同步消息
2、IM实例处理 MSG_IM 时是否可以仅发送MSG_SYNC_NOTIFY,让接收消息的终端自己主动向服务器拉取具体消息
这样似乎可以减少服务器处理消息的压力,请教
Lines 205 to 216 in f8a46c7
编译并执行了im、ims、imr三个服务,配置也根据自己的情况做了修改,日志里没有报错。但我不知道服务端的RestAPI接口在哪里。
http://developer.gobelieve.io/static/docs/im/Server.html
我在源代码里没有找到相应的代码,麻烦指点一下。
make install
cd im && make
make[1]: Entering directory /root/go/im_service/im' go build -ldflags "-X main.VERSION=2.0.0 -X 'main.BUILD_TIME=
date' -X 'main.GO_VERSION=
go version' -X 'main.GIT_COMMIT_ID=
git log --pretty=format:"%h" -1' -X 'main.GIT_BRANCH=
git rev-parse --abbrev-ref HEAD`'" -o im im_server.go im.go subscriber.go connection.go client.go peer_client.go group_client.go room_client.go customer_client.go route.go app_route.go protocol.go message.go group_manager.go group.go set.go config.go monitoring.go sio.go storage_rpc.go channel.go storage_message.go route_message.go user.go rpc.go dummy_grpc.go device.go group_message_deliver.go relationship.go relationship_pool.go redis_channel.go
./sio.go:93:28: undefined: engineio.MessageBinary
./sio.go:117:10: undefined: engineio.MessageText
make[1]: *** [im] Error 2
make[1]: Leaving directory `/root/go/im_service/im'
go version go1.13 linux/amd64
what`s the problem ? buddy
cd im && make
make[1]: 进入目录“/home/develkone/go/src/im_service/im”
go test -c im_test.go user.go relationship.go relationship_pool.go protocol.go message.go config.go
# command-line-arguments
./relationship_pool.go:238:3: Info call has possible formatting directive %+v
./relationship_pool.go:253:3: Info call has possible formatting directive %+v
Makefile:29: recipe for target 'main.test' failed
make[1]: *** [main.test] Error 2
make[1]: 离开目录“/home/develkone/go/src/im_service/im”
Makefile:5: recipe for target 'im_bin' failed
make: *** [im_bin] Error 2
看你们那个瓜聊是支持语音及视频聊天的,与这个是同一个服务端吗?想确认一下。谢谢。
./sio.go:93:28: undefined: engineio.MessageBinary
./sio.go:117:10: undefined: engineio.MessageText
make[1]: *** [im] 错误 2
Golang you must go get
a lot of package.But It's not so good in China. So, As k8s
project, you can use godep save
to keep all dependence in vendor dir. You no longer need to hand download other package.
func (s *RPCServer) LoadHistoryMessage(ctx context.Context, r *pb.LoadHistoryRequest) (*pb.HistoryMessage, error) {
appid := r.Appid
uid := r.Uid
msgid := r.LastId
storage_pool := GetStorageConnPool(uid)
GetStorageConnPool无实现函数
config.go:25:8: cannot find package "github.com/jimlawless/cfg"
the package github.com/jimlawless/cfg is not found!!
支持语音和视频吗?
cd im && make
go build -ldflags "-X main.VERSION=2.0.0 -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`' -X 'main.GIT_COMMIT_ID=`git log --pretty=format:"%h" -1`' -X 'main.GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`'" im.go subscriber.go connection.go client.go peer_client.go group_client.go room_client.go customer_client.go route.go app_route.go protocol.go message.go group_manager.go group.go set.go config.go monitoring.go sio.go storage_rpc.go channel.go storage_message.go route_message.go user.go rpc.go dummy_grpc.go device.go group_message_deliver.go
# command-line-arguments
./sio.go:90:28: undefined: engineio.BINARY
./sio.go:114:10: undefined: engineio.TEXT
make[1]: *** [im] Error 2
make: *** [im_bin] Error 2
It show error at masOS 10.14.
can't load package: package main:
app_route.go:1:1: expected 'package', found 'ILLEGAL'
im/app_route.go内的
../app_route.go(这是什么???)
另外golang 怎么用make编译。。。难道没有用官方编译器??
1.im.cfg.sample 里没有相关的配置项
2.make 出来的应用没有im_api 与readme 文档对应不上
比如500人的群,如果群活跃,并发消息100,那么就是50000的拉取请求。
图上的信息如下:
The following issues were found in Gopkg.toml:
✗ unable to deduce repository and source type for "golang.org/x/net": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net?go-get=1": Get http://golang.org/x/net?go-get=1: dial tcp 216.239.37.1:80: i/o timeout
✗ unable to deduce repository and source type for "google.golang.org/grpc": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://google.golang.org/grpc?go-get=1": Get http://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:80: i/o timeout
ProjectRoot name validation failed
刚开始接触im_server想问一下,这个是否支持语音消息发送,类似微信语音功能
when I perform"go get github.com/go-sql-driver/mysql"
,I got an error " /golib/src/github.com/go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig"
使用源码在自己服务器上搭建im_service后,如何设置以下参数,如何设置ios推送
您好,
我一直在研究IM服务端开发这块,我看有一些人选择了C++进行开发,麻烦问一下你们为啥选择了go语言呢?请问一下除了这个选择之外,还有别的语言或者框架推荐一下的吗?谢谢
按照之前版本的 Readme 来编译会报错,最后通过执行 dep ensure
再 make install
就可以了。
现在按照最新的 Readme 来编译,执行 make install
还是报错,不知道什么原因?
cd im && make go build -ldflags "-X main.VERSION=2.0.0 -X 'main.BUILD_TIME=
date' -X 'main.GO_VERSION=
go version' -X 'main.GIT_COMMIT_ID=
git log --pretty=format:"%h" -1' -X 'main.GIT_BRANCH=
git rev-parse --abbrev-ref HEAD'" im.go subscriber.go connection.go client.go peer_client.go group_client.go room_client.go customer_client.go route.go app_route.go protocol.go message.go group_manager.go group.go set.go config.go monitoring.go sio.go storage_rpc.go channel.go storage_message.go route_message.go user.go rpc.go dummy_grpc.go device.go group_message_deliver.go command-line-arguments ./sio.go:93:28: undefined: engineio.MessageBinary ./sio.go:117:10: undefined: engineio.MessageText make[1]: *** [im] Error 2 make: *** [im_bin] Error 2
The package github.com/jimlawless/cfg removed by author,build project failed.
message seq is inited in the below function, it's not global variable, and I don't see any function loading this one, so, when one client is offline and online again, the seq will always begin from 0?
func (client *Client) Write() {
我在上面的函数里面看到有初始化seq的地方,但没有看到任何地方对它进行持久化,那么,客户端再次连接进来之后,seq岂不是依然从0开始?
看文档不是这么说的,文档说客户端连接后,可以从某个seq位置来取消息,类似于断点续传?
google.golang.org/grpc/internal/transport
../../google.golang.org/grpc/internal/transport/handler_server.go:221:12: undefined: http2.TrailerPrefix
../../google.golang.org/grpc/internal/transport/http2_client.go:632:20: f.Size undefined (type hpack.HeaderField has no field or method Size)
../../google.golang.org/grpc/internal/transport/http2_client.go:1138:45: undefined: http2.MetaHeadersFrame
../../google.golang.org/grpc/internal/transport/http2_client.go:1251:24: t.framer.fr.ErrorDetail undefined (type *http2.Framer has no field or method ErrorDetail)
../../google.golang.org/grpc/internal/transport/http2_client.go:1262:9: undefined: http2.MetaHeadersFrame
../../google.golang.org/grpc/internal/transport/http2_server.go:287:45: undefined: http2.MetaHeadersFrame
../../google.golang.org/grpc/internal/transport/http2_server.go:460:9: undefined: http2.MetaHeadersFrame
../../google.golang.org/grpc/internal/transport/http2_server.go:731:19: f.Size undefined (type hpack.HeaderField has no field or method Size)
../../google.golang.org/grpc/internal/transport/http_util.go:262:43: undefined: http2.MetaHeadersFrame
../../google.golang.org/grpc/internal/transport/http_util.go:672:6: f.fr.SetReuseFrames undefined (type *http2.Framer has no field or method SetReuseFrames)
../../google.golang.org/grpc/internal/transport/http_util.go:672:6: too many errors
运行./ims ims.cfg 报这个错
open file:open /tmp/im/messages: no such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.