Giter Site home page Giter Site logo

candy's Issues

关于candy集群模式的疑问

请问,candy现在是不是不支持集群模式(多个store,多个notifer)
具体一点:gate如何选择的store2,以及store如何根据region信息计算得到用户B通过notifer2推送。
谢谢~

alpha版

预计10月1号
服务端,android版:能注册,登录,添加好友,聊天

当从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.客户端上传改用request&response方式
2.服务端下推继续使用stream方式,但每条消息结构中要增加前一条消息id(store中的lastMessageID)

客户端处理流程:
1.每收到一个消息,检测消息中的前一第消息id在本地是否存在,不存在的话请求服务器,收这条消息
2.每发送一个消息要检测返回是否成功,有问题重新发送

整理一下使用过程中碰到的问题

1.加载离线消息以后,离线消息没有被消费,下次加载的时候离线消息仍然存在。
2.离线消息量过大,是否可以加一个分页加载。
3.不能收到非好友发送的消息。
4.Android中使用的时候经常收不到推送消息(尤其是确认添加好友的消息)。
5.关于网络中断,或者链接断开是否可以抛出异常。

gate与notice调用方式改造

目前:
notice每次通过主动创建的与gate的连接,然后再通过push接口发送的消息
改造为:
gate启动后连接notice,并创建对应单向stream,notice向gate发消息通过stream直接扔过来

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.