Using Synchronous Integration


On the surface it may appear that asynchronous integration is a better methodology, as it doesn't lock either process. This is not the case, however, given that there is really no "better" option. Each methodology has its advantages and its disadvantages relative to the other. The needs of the application should dictate which to use. So for example, there are a number of places where synchronous integration is a better option:

  • Applications with a large user base is one. The best example of this is the Internet. You may have a public facing system that people from an enormous and anonymous user base can connect to and integrate with. As such, traffic is difficult to predict. Many times you may have one or two users connecting a day; other times you could have millions connecting an hour. In these cases, a synchronous integration strategy is the best option as it best handles peaks in traffic. An example of this can be seen with the traffic at the humorist site, www.jibjab.com. This site distributes flash animations lampooning political candidates, and their traffic can be seen to leap to five to six times their typical rate upon release of a new movie [JIBJAB].

  • If it is urgent that the results of the process are available as quickly as possible to the constituents, then synchronous integration is a better strategy. It ensures, due to its nature, that a process is always "listening" for the others in the integration and can respond immediately to results. When using an asynchronous strategy, this is not always the case.

  • A synchronous integration strategy is also necessary when up-to-date data is crucial. When following a synchronous strategy, many clients connecting to a server go through a queuing mechanism so that they get the response from the server upon the server finishing the transaction, and the data they receive is up to date. When following an asynchronous strategy, the data may change between the client receiving the callback and it being processed. As such, by the time the data is processed, it may be out of date. So in the example of time and sales information for stock trades, where for volatile stocks trades can occur many times per second, if calls to query the data are queued, they are ensured of always getting the "fresh" data returned through the session call. In the case of an asynchronous call, the fresh data is delivered, but the client application raises an event for the data to be processed. Having the application catch and process the event may lead to the data being "stale" by the time the application processes it.

There are several technologies that can be used for synchronous integration, which are explored in the following sections and in more detail in the following chapters.




Java EE and. Net Interoperability(c) Integration Strategies, Patterns, and Best Practices
Java EE and .NET Interoperability: Integration Strategies, Patterns, and Best Practices
ISBN: 0131472232
EAN: 2147483647
Year: N/A
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net