I have this topology : ( notice WAS )
each Service1 , service2 ...service-n is in a separate appdomain in iis.
Service1
need to consume Service2
.However he can access service2's
endpoints via nettcp
or http
endpoint.
Where is the decision ? ( nettcp ot http )
In a separate Config file. (which is in c:\cfg
folder , and of course service1 reads the cfg in order to decide to which binding he should access at service2
.)
Service2
also should be able to see the file cause he consumes other services as well. but lets talk(for now) about service1
as calling service2
.
a typical entry in cfg file will be :
key : current_service2_Active_endpoint
val : nettcp
So here is my problem :
- I need to find a solution that will read the CFG into a cache or something so
service1
will read the cfg entries from cache and not via filesystem. but Service2 should also read it but the cache wont be the same ( different appdomain). how should I do it ? where should I write the code (uploading to cache) ? I only have this 2 files : ( maybe when the service is up - but what is the code for that ? )
- I want that each change in the CFG file - will reload the entries into cache.
this seems as a classic
cache
task. Cache dependency on a file seems to be the solution , but again there will be[n]
cache dependencies because of[n]
appDomains....