File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Java vs Ruby vs .NET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Java vs Ruby vs .NET" Watch "Java vs Ruby vs .NET" New topic
Author

Java vs Ruby vs .NET

Gad Flailimbs
Greenhorn

Joined: Mar 21, 2007
Posts: 15
I'm kinda new to this webservice stuff and I was just curious which is the most efficient? I'm working on a Java based game and I'm at the stage that I'm working on multiplayer stuff. I've tried sockets and RMI with a lot of hardship, I was thinking webservice would be great because it can be run with a web app that will lessen the strain on the database and have not have clients communicating directly with eachother.

Which would be the best for me? Is there anything I should keep in mind while designing it (e.g., simple methods? connectivity restrictions?). It being a game the clients will be constantly sending information and receiving the coordinates of all the other players I don't know the impact this will have when 10 people are all running it at the same time....


Java Game:<br /><a href="http://pokemon.ele-mentalfury.com/" target="_blank" rel="nofollow">http://pokemon.ele-mentalfury.com/</a><br />Webcomic:<br /><a href="http://ele-mentalfury.com/" target="_blank" rel="nofollow">http://ele-mentalfury.com/</a>
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Hi Gad,

The idea of using a SOAP-based web service as the communication medium for a multi-player game sounds dangerous. Dangerous as in I'm not sure if you can support even 2 players like that without performance issues because SOAP and HTTP are rather verbose protocols.

The relevance of this, of course, depends a lot on your particular game which I know nothing about so I might be crying for the wolf at the wrong time.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12779
    
    5
SOAP is certainly verbose but I think you would find the advantages of using HTTP addressing greatly outweigh the extra parsing time.

For example by sticking to HTTP over port 80 you get past firewalls easily. The server support for HTTP (for example Tomcat) is well developed. It seems to me that coordination for 10 players using anything other than a client-server-backend model would be quite tricky.

A big decision to be made is how data is formatted - can you express the data required as serialized Java objects?

The web service design of SOAP & WSDL are really aimed at ease of public access with generalized clients - since you are building your own client, you dont need that.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java vs Ruby vs .NET