简体   繁体   中英

Dynamic WCF service coupling on IIS

I am trying to build a service mechanism which should be add-on based and communicating through a publish subscribe system. It must be based on WCF services. What I have right now is a concept which I can't get to work so I decided to ask you because maybe I am going at this the wrong way (I only just started using WCF).

What I want to achieve is making a single core service with session persistency which can be extended by linking an unknown number of add-on services. I want to set up the publish subscribe system at runtime, not at buildtime, so the core-service should be able to detect what add-on services are available (using the web.config?) and then bind them to the message bus.

From the front end (ASP classic) it must be possible to access any .svc file but, maintaining session, each .svc file must be connected to the message bus.

All is hosted in a single IIS active directory.

Can you give me some hints as to where to look?

I am especially interesed in:

  • WCF dynamic discovery
  • WCF to WCF communication on the same host (in the same active directory even)

Thanks in advance, hope you can help!

Update

Thanks for your answers, I'll read up at the links you send me. I'll post my final concept solution here in due time for future reference.

I was having a similar problem since I have one common WCF service but the implementation depends on the user's role so it was kind of difficult to do that at runtime. I found this tutorial on the matter which runs great for my propouses: http://blog.micic.ch/net/dynamic-iis-hosted-wcf-service

I have tested in my env and is very powerful technique. Hope that helps you as well. Cheers.

My 2 cents about Publish subscribe mechanism using WCF - WCF is not inherently built for pub/sub mechanism. It is built for Request/Response model of communication. Have a look at the NService Bus for pub/sub here

Talking about Add on services on top of core service, I am not able to get What you want exactly ? Is it the Routing service which you want ? WCF 4 now provides routing service For more information look here The link also talks in detail about the discovery mechanism in WCF 4.

Also have a look the Agatha framework which also have single WCF service and no. of request handlers where in the framework will decide which request handler to call based on each request.

Search for Agatha - Davy brion for more information

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM