I am working with Integration of multiple applications which is using their own databases.
I have three applications, say A,B,C with corresponding databases databaseA, databaseB, and databaseC respectively.
Here A is the parent application while one transaction is happening in application A , its updating ‘databaseA’ and using the same thread calling an API provided by application B and updating ‘databseB’.
Now I want to send the data from application B to application C using some API provided by application C, at the same moment some change happened to ‘databaseB’. If I am using the same thread which is used for A->B transaction may cause transaction time out and many other issues.
Instead what can I do for proper Integration of these three applications. I guess something like this will be fine. But I don’t know how to make such triggers.. (in my situation A->B,A->C is not following to some reasons)
1.A-->databaseA triggers One another transaction i.e 2.databaseA-->API from B-->databaseB it triggers another transaction 3.databaseB -->API from C -->databaseC
I want to do this in application level(not triggering from the data base). What will be the best approach that will trigger a new transaction from the current transaction and prone to less failure?
You need some kind of async and reliable message delivery. So App A won’t wait for App B while it processes its message, and so on. But this implies you have access to the code.
I can think that such a mechanism can be implemented over MSMQ:
MSMQ integration could be done either by using the managed Message Queuing API or with WCF over MSMQ (I recommend the latter).
This way all three apps are loosely coupled and processing can be done asynchronously in all components.
Additional solution, as suggested by @dtryon, which can provide an abstraction layer over MSMQ, would be NServiceBus. Never used it myself, but heard only good things about it.