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