开发者

amqp or xmpp for real time online games [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 3 months ago.

The community reviewed whether to reopen this question 3 months ago and left it closed:

Original close reason(s) were not resolved开发者_JS百科

Improve this question

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 android (native, no javascript).
  3. client library for Microsoft Windows (most important), also for mac os x and linux.
  4. Good documentation specially for mod development
  5. Project is not open-source. So, can only use libraries with suitable license.

I can program in erlang and java as well, programming language isn't an issue.

I was looking at following server technologies like Openfire, Tigase, ejabberd and RabbitMQ. All are good for my project but I want to know more about what suite my needs, AMQP or XMPP.

What AMQP offer specially for real time online games. Is it better option then xmpp?


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...


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜