views:

221

answers:

1

Hello,

I am currently working on a silverlight application, more precisely a game, that has 2 states : Lobby and Game.

I created my service application to reflect that structure. I created a LobbyService to handle all lobby related operations and a GameService to handle all actual game operations. On top of that, I have a third service 'GeneralService' that handles operations that are shared between both states (chat, system messages, etc...).

I am pretty happy with the design itself, but reading up on the scalability of Duplex services has lead me to believe that it may not be a good idea to have 3 services, which potentially means 2-3 duplex channels opened at the same time for each client, thus taking up more resources on the server's end.

So my question is, is it better to have only 1 WCF Service (.svc) for everything (maybe just by implementing 3 different data contracts) or should it be ok to keep the current design and split the services logically into their own service?

Thanks!

A: 

If there are security / rights differences between the LobbyService and the GameService, I would keep them as two different services.

You could purhaps allow these services to Inherhit from the GeneralService, thereby having that functionality available in both services.

This reduces the number of duplex channels open for each client, while maintaining the structure or your services.

Shiraz Bhaiji