This is a creation in Article, where the information may have evolved or changed.
This system is cheetah mobile based on go language development of a set of message push system, Source address: Https://github.com/Terry-Mao/goim
First, the structure diagram
Second, the function of the introduction
1.comet
Long connection server, support long rotation, TCP, websocket connection, have timeout mechanism
2.logic
Logical processing server, message push into the port, through the UserID in the router server to find the corresponding Comet server, the ServerID and messages saved to the Kafka queue, logic is a stateless server, can be arbitrarily add and remove, because comet needs to connect logic, So the virtual Ip,lvs with the LVS that need to connect logic in the comet server will not be broken after adding the real server, so it is necessary to trigger sighup in the comet service and re-load the configuration file.
3.router
routing server, save userid and serverid userid roomid roomid
4.job
Message forwarding server, from the Kafka queue to get messages, sent to the comet server, stateless server can be arbitrarily additions and deletions.
Third, the characteristics of the push service
1. Support multiple connections on one side, such as the same user on a different computer login can receive messages at the same time;
2. Client-side differentiation not supported (pc/wap/ios/android)
3. There is currently no query whether a user is online, some business has the need to display online status, this can add an interface to the logic server, if the message is not in the line may be sent through other push services (such as carrier pigeon push), this can be modified by the push interface return value to determine
4. Mass can only be received online, if not on the line to discard this message, of course, the next time users can log on through the unread message interface to get
5. Comet->logic->router, rather than comet->router, during long connections, so that other user states, unread messages, etc. can be obtained in the logical server, which makes comet simple and does not have consistency issues.
6. Support the mass function, all users or according to Roomid to Mass, this function is too cool, efficiency is not to improve the 1:30 point.
Thanks to the open source IM products of the cheetah students, so that we can have more beautiful things
Other similar software are:
moonmq:http://blog.csdn.net/siddontang/article/details/22889495
rocketmq:http://blog.csdn.net/a19881029/article/details/34446629
beanstalkd:http://blog.csdn.net/xcl168/article/details/47705725
fishchat:https:// Github.com/oikomi/fishchatserver