Patterns are a commonly used concept in computer science to describe good solutions to reoccurring problems in an abstract form. The cloud patterns speak a higher level of language and address system components. There are number of architecture and design patterns and best practices that help you select a cloud platform and implement cloud services and applications. In general, Cloud patterns fall into four categories storage, compute, management/administration and communication.
1. Storage patterns
Cloud storage provides remote storage and abstracts the storage medium away from the users. The design is adequately flexible to support a wide range of application requirements. Two patterns of cloud storage: table storage and blob storage. The table storage pattern allows the applications to store key/value pairs following a table structure while the blob storage pattern can be used to store any data.
The idea of storing data into the cloud is to avoid worry about DBA tasks. Most cloud vendor provides large scale key/value store as well as RDBMS services.
• Structured Storage
Storing data in a table structure while not demanding full relational semantics makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database administration tasks.
For example, Amazon RDS gives you access to the capabilities of a familiar MySQL or Oracle database. This means that the code, applications, and tools you already use today with your existing databases can be used with Amazon RDS.
• Un-Structured Storage
It is a notion of storing large amount of unstructured data. Highly durable storage infrastructure designed for mission-critical and primary data storage. Objects are redundantly stored on multiple devices across multiple facilities.
For example, Amazon S3 is designed to make web-scale computing easier for developers. Amazon S3 can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure.
• Flyweight
A flyweight is an object that minimizes memory use by sharing as much data as possible with other similar objects; it is a way to use objects in large numbers when a simple repeated representation would use an unacceptable amount of memory. Many workloads present opportunities for sharing memory across virtual machines.
For example, several virtual machines might be running instances of the same guest operating system, have the same applications or components loaded, or contain common data. VMware ESX/ESXi systems use a proprietary transparent page-sharing technique to securely eliminate redundant copies of memory pages.
A workload of many nearly identical virtual machines might free up more than thirty percent of memory, while a more diverse workload might result in savings of less than five percent of memory.
2. Compute patterns
• Multi-tenancy
The key idea is to use the same set of resources to host the application for different customers. Consumers might utilize a public cloud provider’s service offerings or actually is from the same organization, such as different business units like finance, HR; but would still share infrastructure. From a provider’s viewpoint, multi-tenancy suggests an architectural and design approach to enable isolation, availability, economies of scale, segmentation, operational competence, and management; leveraging shared infrastructure, services, data, metadata, and applications across many different consumers.
To benefit from an elastic infrastructure regarding the enabled alignment of resource numbers to experienced workload, the overall scaling process of the applications has to be automated. User can scale your applications up and down to match your unexpected demand without any human intervention. Auto-scaling promotes automation and drives more efficiency.
i. Passive listener
Passive listener model uses a synchronous communication pattern where the client pushes request to the server and synchronously waits for the processing result. In the passive listener model, machine instances are typically sit behind a load balancer.
ii. Active Listener
Active worker model uses asynchronous communication patterns where the client put the request to a queue, which will be periodically polled by the server. After queuing the request, the client will do some other work and come back later to pick up the result.
• Big Data Processing
Businesses, researchers, data analysts, and developers can use cloud computing to process vast amounts of data easily and cost-effectively. Amazon Map-Reduce utilizes a hosted Hadoop framework running on the web-scale infrastructure of Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3). In a nutshell, the Elastic MapReduce service runs a hosted Hadoop instance on an EC2 instance (master), and it’s able to instantly provision other pre-configured EC2instances (slave nodes) to distribute the MapReduce process, which are all terminated once the MapReduce tasks complete running.
3. Administration / Management patterns
Administration patterns differentiate two core aspects of service management: service deployment and service-level-management. Deployment patterns organize service definition, configuration, and monitoring, while other patterns address service-level management and regular operational maintenance.
• Design for Operations
How to make my application operations-ready can be the vital issue and that can be done by providing health status and logging.
• Cloud Deployment
Deployment patterns organize service definition, configuration, monitoring and deploying applications with desired configurations such as scale-out and high-availability requirements. Start, stop, and suspend cloud apps.
• Cloud Broker
Provide a single point of contact and management for multiple cloud service providers and maximize the benefits of leveraging multiple external clouds.
Technically, a cloud broker is able to:
- Work seamlessly with different cloud services providers on behalf of customers. It includes taking care of system provisioning, monitoring, billing, etc. In some sense, it’s like service aggregation.
- Ideally, move workloads among the service providers. No longer are you locked in with a particular service provider.
- Maximize performance/price ratio of cloud services by shuffling workloads among the providers.
- Scale the VMs beyond one service provider who may not have enough resources. Who says cloud is unlimited? In theory it’s so, but in reality every service provider has a limit which you just don’t hit normally.
The DMTF formed the Open Cloud Standards Incubator to assess the impacts of cloud computing on management and virtualization standards and to make recommendations for extensions to better align with the requirements of cloud environments.
4. Communication Patterns
A queue (or mailbox) service provides a mechanism for different machines to communicate in an asynchronous manner via message passing. These patterns address message exchange. Azure technology leverages Windows Communication Foundation (WCF) and REST APIs for Web service communication. You must consider partial trust models and the stateless nature of the application while implementing communication patterns.
Amazon Simple Notification Service (Amazon SNS) is a web service that makes it easy to set up, operate, and send notifications from the cloud. It provides developers with a highly scalable, flexible, and cost-effective capability to publish messages from an application and immediately deliver them to subscribers or other applications. It is designed to make web-scale computing easier for developers.
• Messaging
Share messages between applications in a scalable, reliable, and asynchronous way. Sending Instant Messages, e-mail, or alerts about resource and billing info. An alarm is comprised of a trigger. There are two types:
Condition, or state, trigger – Monitors the current condition or state; for example: A virtual machine’s current snapshot is above 2GB in size. A host is using 90 percent of its total memory. A data store has been disconnected from all hosts.
Event – Monitors events; for example: The health of a host’s hardware has changed.
Final Thoughts :
The thought process to reach an architectural pattern is as important as, the solution itself. Without this, you may easily get lost while applying an architecture patterns to a real world problem.
References :
http://www.doublecloud.org/2010/10/cloud-architecture-patterns-vm-factory/
http://en.wikipedia.org/wiki/Architectural_pattern_%28computer_science%29
http://msdn.microsoft.com/en-us/magazine/dd727504.aspx
http://www.slideshare.net/AmazonWebServices/aws-architectingjvariafinal
http://architects.dzone.com/news/cloud-computing-patterns
*If you find something is misleading or not correct then please throw some light on it.