dearcode / candy Goto Github PK
View Code? Open in Web Editor NEW新一代IM
License: GNU General Public License v3.0
新一代IM
License: GNU General Public License v3.0
预计10月1号
服务端,android版:能注册,登录,添加好友,聊天
请问如架构中所示节点水平扩展以后,例如存储节点为多个时,如何做到数据的一致性?
当从Android 端添加好友时服务器报错
2019/02/03 23:53:20 manager.go:97 [error] getConnection get token error:D:/GOPATH/src/github.com/dearcode/candy/util/errors.go:74: invalid context
D:/GOPATH/src/github.com/dearcode/candy/util/common.go:95: , ctx:context.Background.WithCancel.WithCancel.WithValue(peer.peerKey{}, &peer.Peer{Addr:(*net.TCPAddr)(0xc04220e240), AuthInfo:credentials.AuthInfo(nil)}).WithValue(transport.streamKey{}, <stream: 0xc0422c8a00, /candy.meta.Gate/Friend>).WithValue(metadata.mdIncomingKey{}, metadata.MD{":authority":[]string{"192.168.0.104"}, "user-agent":[]string{"grpc-go/1.0"}})
Android 端返回这个
I/IMManager: onError: {"event":0,"from":0,"group":0,"id":0,"msg":"rpc error: code \u003d 12 desc \u003d unknown method Ready","relation":0,"to":0}
2019-02-04 00:12:29.700 18910-18910/com.culturer.mplayer I/accs.MsgDistributeService: onStartCommand action:com.taobao.accs.intent.action.RECEIVE
2019-02-04 00:12:29.700 18910-18954/com.culturer.mplayer I/accs.MsgDistribute: distribute command::103 serviceId:: dataId:: appkey: config:
2019-02-04 00:12:30.222 18910-18910/com.culturer.mplayer I/IMManager: nUnHealth: {"event":0,"from":0,"group":0,"id":0,"msg":"rpc error: code \u003d 12 desc \u003d unknown service grpc.health.v1.Health","relation":0,"to":0}
添加最近联系人接口
1.加载离线消息以后,离线消息没有被消费,下次加载的时候离线消息仍然存在。
2.离线消息量过大,是否可以加一个分页加载。
3.不能收到非好友发送的消息。
4.Android中使用的时候经常收不到推送消息(尤其是确认添加好友的消息)。
5.关于网络中断,或者链接断开是否可以抛出异常。
目前:
notice每次通过主动创建的与gate的连接,然后再通过push接口发送的消息
改造为:
gate启动后连接notice,并创建对应单向stream,notice向gate发消息通过stream直接扔过来
请问,candy现在是不是不支持集群模式(多个store,多个notifer)
具体一点:gate如何选择的store2,以及store如何根据region信息计算得到用户B通过notifer2推送。
谢谢~
消息防丢失分为两个部分,客户端上行,服务端下推
改造:
1.客户端上传改用request&response方式
2.服务端下推继续使用stream方式,但每条消息结构中要增加前一条消息id(store中的lastMessageID)
客户端处理流程:
1.每收到一个消息,检测消息中的前一第消息id在本地是否存在,不存在的话请求服务器,收这条消息
2.每发送一个消息要检测返回是否成功,有问题重新发送
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.