开发者

Constraints when using WCF for an online multiplayer game

I want to build a service oriented game server and client using WCF where users can play card games on different tables after they logged in with an account.

I would like t开发者_开发问答o choose WCF due to it's flexibility in exchanging the communication channels. Maybe, a web interface will be added later which can then just use an other channel class. An additional plus is the ability for contexts which could be used to track a user over a whole gaming session.

Are there some constraints I should be aware of when using WCF for the communication between the client and the server?


Going over the internet, you'll probably want to make sure to have message security turned on. Over the internet, you typically can't use transport security, because you have no control over how many intermediaries there are between the client machine and your service.

Also, you'll want to think about what binding to use in general:

  • webHttpBinding is the REST way of doing things - lightweight, can be browsed to in a browser window, and it's supported by just about any kind of client. It's entirely stateless - no sessions

  • wsHttpBinding is the SOAP way of doing things - but this probably requires you to write your own client, or publish a SOAP API - but that's definitely less supported and has a higher learning curve to get into. wsHttpBinding does support sessions, however.

Authentication will be a big issue - do you keep those users in a ASP.NET membership database, or do you have your own user store, or do you want to add them as user accounts to your Active Directory (if you have such a beast)?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜