The messages/notifications between two ServiceHosts
-
I have similar code on server hosting-side:
(The hosting-part of code is very simplistic)// Creation ServiceHost #1.
serviceFirst = new ServiceHost(typeof(DomainServiceFirst));
// Waiting for incoming message
serviceFirst.Open();// Creation ServiceHost #2. serviceSecond = new ServiceHost(typeof(DomainServiceSecond)); // Waiting for incoming message serviceSecond.Open();
I need to send and receive the messages/notifications about the model-changes between DomainServiceFirst and DomainServiceSecond.
During the life-time DomainServiceFirst or DomainServiceSecond is activated several changes in the part’s of general model :DomainServiceFirst => DomainModelFirst (the part of general model);
DomainServiceSecond => DomainModelSecond (the part of general model too)
In the same time the General model is consist of DomainModelFirst & DomainModelSecond
Each of services (DomainServiceFirst and DomainServiceSecond ) are decorated :
\[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession, IncludeExceptionDetailInFaults = true)\]
My question is:
Is it exists some specifically approach inside WCF-technology for do that (woks with an messages/notifications); if it so, can you please share some internet-links with best-practice examples. Thank you.