I'm looking to create a rich-featured application using a client/server model, using WCF as a possible communications framework.
I will host the service(s) in a Windows Service (so with WCF I'd using netTcpBinding).
Now, I suppose I could define every service operation into a single service contract, but there could be quite a few operations and I'd rather divide them into several cohesive service contracts.
Would splitting my operations into a set of Service Contracts mean that I would have to host each service on a separate port? (That wouldn't be ideal as I'd prefer to run it on one port.)
Any design tips regarding this scenario? Thanks :)
Update
Sorry for any confusion - It wasn't my intention to host each every service operation in a different contract, only to group them sensibly. My problem stems from the fact that I thought that it wasn't possible to host multiple ServiceHosts on one port.
<slaps forehead>
Joe says that it is possible to simply host multiple service hosts on one port. I think I must have misunderstood an exception message when I was trying this out originally. If I can get this to work then I think it will be my favoured solution.
I think that @Koystya and co's approach of implementing each interface on a single concrete object and hosting it in a single ServiceHost is also a good pragmatic solution to my question. Especially if you treat that single concrete object as a sort of Facade. One downside I can think of tho, is that you wouldn't be able to have different ServiceBehaviors depending on the contract.
Also, I do agree with Joe's logic of when it's appropriate to implement multiple service contracts on one concrete class.