amqp or xmpp for real time online games

后端 未结 4 608
情歌与酒
情歌与酒 2021-01-30 09:52

Which of these technology suite for Multi user online game project.. Project requirements: 1. Able to handle 2k-5k user at any given time. 2. client library for iphone and andr

相关标签:
4条回答
  • 2021-01-30 10:13

    5K users doesn't tell me much about their behaviour, but if they all submited one request within the same 10 second window then let's say you'd be looking in the 500-1000 requests per second.

    I've had Active/MQ running on my relatively low-powered lap-top easily handling 300 requests per second and so I'd happily recommend it here. You can also set up clusters of brokers and achieve horizontal scalability. You can use an http protocol (STOMP) or its native binary protocol. Lots of client API libraries also for C/C++, Java, JavaScript and others. There is some initial AMQP support.

    You didn't mention any persistence requirement, but again I would have thought that most RDBMSs would suffice. That said, some of the document oriented and big-table type databases look interesting from a horizontal scaling perspective.

    I've also found Apache Camel highly performant and I strongly recommend it. Camel is used to implement your logic layer.

    'hope that this helps.

    0 讨论(0)
  • 2021-01-30 10:14

    A key difference between XMPP and AMQP is binary content. AMQP handles binary data just fine, and XMPP seems more designed for XML. Personally for online games I use Google Protocol Buffers for message formatting and parsing, and with their very small binary footprint, I'd be more inclined to use AMQP to deliver those messages.

    But do consider what AMQP server you want to use. I've been bitten by using RabbitMQ for my AMQP server in the past. RabbitMQ does not have any flow control facilities, at all. So if your clients are sending messages faster than your server can consume them, buffers on the server can fill up and blow the server up. More recent versions of RabbitMQ implement flow control in an exceedingly coarse way: they halt all consumers in the system until memory clears up.

    I've never tried zeromq; perhaps it'd be better for the things I've been using RabbitMQ for...

    0 讨论(0)
  • 2021-01-30 10:20

    XMPP can be used in textual games. http://gamerunes.com

    0 讨论(0)
  • 2021-01-30 10:28

    The people of Linden Labs (Second Life) made a thorough comparison of a lot of messaging systems that you should read:

    http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes

    For what is worth, I'm using zeromq in a project and it's really interesting because ,depending on the use case, you don't need a broker node.

    0 讨论(0)
提交回复
热议问题