Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF client/server model
    primarykey
    data
    text
    <p>I'm looking to create a rich-featured application using a client/server model, using WCF as a possible communications framework.</p> <p>I will host the service(s) in a Windows Service (so with WCF I'd using netTcpBinding).</p> <p>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.</p> <p>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.)</p> <p>Any design tips regarding this scenario? Thanks :)</p> <p><strong>Update</strong></p> <p>Sorry for any confusion - It wasn't my intention to host each <em>every</em> 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. </p> <p>&lt;slaps forehead></p> <p>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.</p> <p>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.</p> <p>Also, I do agree with Joe's logic of when it's appropriate to implement multiple service contracts on one concrete class.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload