Hi everyone !
I am moving my architecture from coupled one to SOA (WCF) loosely coupled. I have several services which communicate with each others. How would you synchronize the business instances between the services?
I see two scenarios here:
All the business objects are created in only one service, let's call it MainService and it's the only one who have access to all of the changes made to the objects. The service is in charge of the update of the objects in the database. Any update of an object raises a notification. Others services register to the events they need and get notified accordingly. I call it the centralized approach.
+ Notify service as soon as a change is done
- A lot of call between services.
- More coupling.All the services just load the objects they need and monitor periodically the database for any change made to them. My idea was to use the change tracking of sql server 2008 to detect any change made to the objects.
+ Less of traffic and possible communication issues between services.
+ Less coupled
- Delay due to periodic monitoring.
So, what is your answer on this ? (if you have a 3, 4, etc... It would also be nice)