Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

就是我看了很多im,有的没有消息路由这一层 #10

Open
879913935 opened this issue Dec 8, 2015 · 2 comments
Open

就是我看了很多im,有的没有消息路由这一层 #10

879913935 opened this issue Dec 8, 2015 · 2 comments

Comments

@879913935
Copy link

可能直接就是逻辑层了,但是如果连接层收到了消息是通过http告诉后面逻辑层,然后逻辑层知道该转发给谁,就在通过http告诉连接层?是不是这样不好

@oikomi
Copy link
Owner

oikomi commented Dec 8, 2015

这里都是做的实时业务,长连接是必须的,http不适合这种场景

@879913935
Copy link
Author

http确实开销大,RPC应该可以吧,但是还要有个路由,就是知道每个用户在哪台机器上,不过对于群消息这种我不清楚怎么处理。
比如用户A发了一个群消息,那路由是通过这条消息里的群ID再去获取每一个人的session判断每个人在哪台服务器,循环一个个发送?我觉得是不是这样效率很低。而且用户信息的路由会是瓶颈?就是每次转发消息都要查询路由。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants