call service from another service
i am trying to follow the Layered service Model http://2.bp.blogspot.com/_Ulehi1qz3j0/SDFTyiUkRGI/AAAAAAAAACc/J0UiCKTeKQk/s1600-h/Layered+Service+Model.gif , so Process service should call task service or entity service. now i just instantiate the other service from first one as class instantiation Service2 myOtherService = new Service2(). i know it is wrong, but should i add service reference in service project and call the other service through proxy as i do in web client?
thanks in Advance
Ahmed SolimanPosted Aug 19, 2009, 11:09 AM
Roei BarPosted Aug 19, 2009, 12:20 AM
i highly recommend you not to do so.
if you want dynamic coupeling between services, you need each service to be unaware of the other service existance.
i would recommend you to read a bit on ESB, the idea is that you basically create a router service that has a datacontract to all services, and all messages goes through him.
example, you have a service requesting data on "b and c" you send a request for them to the router, he will go to "b" and to "c"
and return their response