Cloud Platforms

Patterns for Cloud Integration

Mohamed Farag

Synchronous vs Asynchronous Application Level Integration

Recent statistics show that 90% of businesses have adopted at least one cloud application. 56% of enterprises are still identifying IT operations that are candidates for cloud hosting [1]. However, recent survey, that was conducted by IDG Enterprise across 1600 IT decision makers, reflects that 46% of survey participants consider cloud integration as one of the major disconnects that hold organizations from going to the cloud [2].

What you should know:
1. Good understanding of object oriented principles
2. Basic understanding of cloud infrastructure and cloud technologies
3. Basic knowledge of cloud delivery models such as Software-as-a-Service (SaaS), Platform-as-a-Service (PaaS), and Infrastructure-as-a-Service (IaaS)

What you will learn:
1. Importance of cloud integration
2. Technical considerations in cloud integration
3. Key features of synchronous and asynchronous cloud integration patterns

Architecture styles evolved significantly in the past decade and opened new doors for cloud technologies, tools and strategy. Cloud services enabled new process thinking on data aggregation, data replication, business function shareability, distributed computing and business partner integration. It drove us to think about NoSQL databases, SaaS improvements and data migration strategies. However, cloud also brought a lot of topics on the table. These topics include network latency, identity management, data security, interoperability, mobile access levels, application monitoring, application connectivity and Service Level Agreements (SLAs). Enormous research and millions of dollars were invested in this area with premises that cloud will pay for such costs. In fact, recent statistics reveal general trend among IT decision-makers to continue the efforts in cloud integration. The main driver in this decision is the increasing Return on Investments (ROI) along with vast improvements in service quality [2].

As a result, major software players, such as IBM and Microsoft, have realized the importance of extending their applications to the cloud and they have been offering cloud integration as major key feature in extending the lifetime of their software. In the same context, other software players (For instance, Dell) have started the development of cloud-only applications due to the cost of cloud integration. This article discusses two major cloud integration patterns that can help in reducing the cost of such expensive process and promote the performance of such applications. This discussion focuses on two cloud integration patterns; synchronous operation offered from Remote Procedure Call (RPC), and Asynchronous Messaging (AM). Both patterns are designed to achieve application-level integrity under certain conditions.

The following section describes each pattern individually with respect to its general use, pros and cons. There are two types of cloud integration that are included in this investigation:

1. Ground-to-Cloud Integration: in which the application was developed in non-cloud environment and we are trying to adopt it to the cloud
2. Cloud-to-Cloud Integration: in which the application targets cloud environment only

Please note that Cloud-to-Ground integration goes beyond the scope of this article.

farag-RPC.png

This pattern is used to integrate multiple applications so that they work together and can exchange information through each application’s interface [3]. It’s useful in information lookup to share data among independent applications. In addition, this pattern is ultimate solution when the data have to live with the source in a different area of the network. Furthermore, the use of application interface promotes several key concepts such as encapsulation, abstraction and interoperability. 

Pros
1. Provides high reliability since it uses point-to-point communication by-default  
2. Ease of implementation as application integration pattern
3. Data access at the source level
4. Connects different independent applications possibly running different technologies

Cons
1. Synchronous operation. In other words, caller is blocked until the operation is completed 
2. Lack of uniform security and transactional support
3. Not suitable at large-scale cloud environments (large distributed environments)
4. Low Performance
5. High level of coupling between services since it assumes the availability of existing service all the time
6. Non-persisted data
7. Limited commercial support

There are on-going improvements to solve the challenges that are introduced by RPC. These improvements include the following topics:
1. Security: In this area, identity management can be used to enforce security in the communication
2. Latency (Performance): There are several tips that can improve the performance over the network with respect to security such as:
     a. Acquiring authentication tokens (e.g. OAuth2)  
     b. Callbacks and Caching
     c. Increased load of messages. In other words, avoid sending enormous number of small packets over the network
3. Transactions: they are not supported by this pattern so avoid using them for acceptable performance and right behavior
4. Commercial Support: maintain communication to be HTTP oriented

Now, how to use the value of this pattern in the extension of ground applications to cloud environment?

There are general considerations while dealing with RPC patterns in ground-to-cloud integrations:
1. REST-Oriented
2. Network Connectivity
3. Identity Management
4. Service Level Agreements
5. Changing Schemas

In order to account for these constraints and perform at the maximum level, Table 1.0 shows possible implementation techniques that can mitigate significant risks.

farag-table1.pngWell, cloud-to-cloud integration brings more consideration to the view. In fact, the considerations that would make sense in this context are:

1. Web Services
2. Latency
3. Service Level Agreements
4. Monitoring

For this set of considerations, the following techniques are available to overcome challenges associated with these considerations:

farag-table2.png
The next subsection introduces asynchronous messaging integration pattern.

farag-AM.png

This pattern uses “Messaging” to transfer packets of data frequently, reliably and asynchronously using customized formats [4]. This pattern is extremely useful for data sharing via broadcasted messages in which the caller does not have to be blocked during operation.

Pros
1. Callers are not blocked when making calls
2. Ideal for broadcasting or multicasting
3. Ideal for cloud-scale
4. Can achieve higher reliability when brokers are used
5. Embrace loose coupling
6. Can be used for point-to-point or message routing to achieve content-based routing, message filtering, recipient list filtering and aggregators
7. Can function in stateful or stateless modes

Cons
1. Not real-time synchronization. In other words, not consistent enough to manage the communication between modules that have some sort of dependency  
2. Achieving reliability may require store + forward which degrade the overall performance
3. Idempotence often needed because of the possibility of message duplication
4. Broadcasting requires parallelization due to the enormous number of messages that are received from peers
5. Difficult to debug and trace
6. Limited commercial application support

Considering these advantages and limitations, how asynchronous messaging can be useful in Ground-to-Cloud integration?

Asynchronous Messaging is great way to limit coupling and module dependencies. However, there are few considerations to implement this pattern in Ground-to-Cloud integration:
1. Network Connectivity
2. Message Monitoring
3. Data Security
4. Interoperability
5. Destination System Capabilities

The use of brokers is significant to the performance and reliability of this pattern. For example, brokers may boost the performance of the overall application with asynchronous push notifications that will promote caching the data that are frequently used. There are few techniques that can be used to maximize the gain from Asynchronous Messaging given Ground-to-Cloud considerations such as those stated in Table 3.0.

farag-table3.png

On the other hand, how Asynchronous Messaging improve Cloud-to-Cloud integration?

Cloud-to-Cloud integration emphasizes several cloud topics including:
1. Identity Management
2. Different Service Level Agreements
3. Message Monitoring
4. Communication Management
5. Interoperability

There are some techniques mentioned in Table 4.0 that highlight these considerations:

farag-table4.png
In Summary 

This article introduced two cloud integration patterns that are used to integrate applications. These patterns differ in their operational nature although they achieve the same goal. In general, Asynchronous Messaging is more convenient for cloud purposes but there is no straight-forward answer to the “all-ages” pattern. Instead, an investigation for use cases weighs the need for one pattern versus the other. Table 5.0 shows sample use cases for each pattern:

farag-table5.png

Bibliography

http://www.forbes.com/sites/louiscolumbus/2014/11/22/cloud-computing-adoption-continues-accelerating-in-the-enterprise/  - spotlights from the study on cloud impact
http://www.idgenterprise.com/report/idg-enterprise-cloud-computing-study-2014  - details on the study.
http://www.enterpriseintegrationpatterns.com/  - Enterprise Cloud Integration Patterns  
https://www.mulesoft.com/resources/esb/cloud-integration-patterns  - Cloud Integration Patterns.
http://www.cloudcomputingpatterns.org/ - Cloud Computing Patterns

References
[1] www.forbes.com/sites/louiscolumbus/2014/11/22/cloud-computing-adoption-continues-accelerating-in-the-enterprise/ 
[2] www.idgenterprise.com/report/idg-enterprise-cloud-computing-study-2014 
[3] www.enterpriseintegrationpatterns.com/patterns/messaging/EncapsulatedSynchronousIntegration.html 
[4] www.enterpriseintegrationpatterns.com/patterns/messaging/Messaging.html 

 

Mohamed Farag
ABOUT THE AUTHOR

Technical Consultant