I am working on a network of 4 players in WPF and learning WCF in the process. So far, to handle network communication, I have been following the advice of the game YeahTrivia in the game Coding4Fun : I use dualHttpBinding, and use the interface CallbackContractto send messages to clients. It works very well.
However, my service is becoming very large. It has methods / callbacks for processing the game itself, as well as a chat system, registration / registration process, matchmaking, growth / player information, etc. Both the server and the client become difficult to maintain, because everything is connected with a single interface. For example, on the client, I have to redirect callbacks to the game page, to the lobby page, etc., and I find it very tedious. I would rather be able to handle game callbacks on the game page, chat callbacks in the chat window, etc.
So what's the best way to handle this? I thought a lot about many things, but I'm not sure what is best: splitting a service into several, having several “endpoints” on my service, or other tricks for implementing the service, where is it necessary?
thanks
source
share