views:

83

answers:

4

I'm designing a game where players are programmed bots competing in a programming contest. The bots can be programmed in any language - Java, Ruby, Python, C#. I'm looking for some way to transmit game data across the network or some way by which the game server can talk to the bots. What would be a better choice for this? Should i use XMPP or some other form of remote method invocation?

A: 

A REST based webservice might be easier to use if you need lots of languages to be able to call it.

David
It's not a webapp. Its a desktop app written in QtRuby. But REST still doesn't answer how i can send/receive messages from bots using PUSH.
Sathish
A: 

The issue with many Remoting infrastructures are that they are normally not portable between frameworks. While XMPP might work for you - the main issue you might find is excessive data crossing the network due to all the header/presence stuff in the data being sent around. Also as XMPP is XML based any binary data would have to be sent around as a Base64 string.

A better bet might be a more low level socket interface - either way having the freedom to do bit-packing to reduce the size of the data will possibly be beneficial.

saret
Your advice is to build his own messaging or RMI infrastructure which supports multiple languages?!?
Robin
He's building a game, not a business app - there might be considerable more network traffic - my point was that a lower level framework/communication mechanism would be beneficial - and that for a game which has a game server, exposing web-service like communication has alot of overhead and that with RMI you need to be wary of non-portable mechanisms - java can't use .Net remoting....If he chooses to go the messaging route I wouldn't recommend that he use build his own middleware - that would be crazy, but using durable messaging for a game's communication might also be crazy
saret
Also his question wasn't about only what framework should he use if you read it ("Should i use XMPP or some other form of remote method invocation?")- he was also asking if XMPP or one of the remote procedure call (RPC) mechanisms such as RMI/DCOM/Corba/.Net Remoting built into some of the listed frameworks/languages (Java, Ruby, Python, C#) will work and I was stating that it's not necessarily a portable route to go - besides it can have other issues as well going this route
saret
@Robin - where did I recommend that? You shouuld definately not reinvent the wheeel - but at the same time you should use the tool/component that is suited for the type of work you're doing
saret
A: 

I always find reinventing the wheel to be tedious. Try and see if you can use OpenTNL.

fuzzy lollipop
+1  A: 

What you are descibing is not an RMI problem but a messaging one. I am sure there are several solutions you could use, and based on the limited knowledge of your application, I would say that XMPP is one of them. It is language agnostic and has libraries (and servers) available in most well supported languages.

Whether it is the best solution, I couldn't say, but I would think it is a viable one. It gives you the option for transmitting from point to point, point to many points, and a means for your game server to broadcast to all clients.

Robin