First,Im running a windows service that should contain a lot of funcionality.There will be a business layer and the results comming from this business layer will be sent over WCF to the presentation layer.
I dont know how to structe all this functionality.
So my questions are :
1. Should I create somekind of a Facade pattern class that will cover all the service classes and put this one Facade Class to one ServiceHost. Or just create a ServiceHost instance for every service class?? Like this
host1 = new ServiceHost(typeof(MyService1));
host2 = new ServiceHost(typeof(MyService2));
2.How granular should be my service classes? Per enitity or per aggregate root or per some functionality block ?
This communication will run over net.pipe.
There's an example of running multiple service hosts under a single windows service here: http://thegrenade.blogspot.com/2009/08/hosting-multiple-wcf-services-under.html
And a related question here: Can you host multiple WCF processes in a single windows service?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With