I'm creating a game on wp7 and it will be an online game played between a max of 4 players. The game will be a turn based game. My question really is what is the best way to do this server wise? is WCF the way to go?

The following is information transferred to and from the server from each player.

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I have no experience with WCF, but maybe it is overkill in your case. Plain old sockets or a remote method invocation should be enough for this.
–
arnaudMay 14 '12 at 11:32

1

cheers for that @arnaud, I will look into sockets more.
–
Gaz83May 14 '12 at 11:40

3 Answers
3

The main problem in my eyes was that web services are based on the HTTP query model. That means a client sends a request to the server, the server handles the request and returns the results.

Communication is always coming from the client side, but never from the server side.

In a chat scenario, this implies that the clients constantly have to poll the server for new messages. Usually one would want the server to notify exactly those clients for which new messages should be distributed.

Constant polling from all clients would put the server under quite some stress.

So, in short, I would refrain from using web services to implement a chat.

SignalR is a .net library that can do what you want. It bills itself as an "Async library for .NET to help build real-time, multi-user interactive web applications." In fact, one of its most compelling demos is a chat site, which I believe is open source. You can find the source code for JabbR at GitHub.

Scott Hanselman wrote a blog post about SignalR that I feel wrapped up the important parts nicely.