Featured on Thoughts on Cloud on November 26, 2012.
Wouldn’t it be great to harness the power of patterns in combination with cloud computing? I’ve blogged about service oriented modeling (SOM) before, because I truly believe in the power and business benefit of orchestrating commoditized IT services. Let’s see how the concept of patterns is extended into cloud infrastructure and cloud applications.
A pattern, in short, is a description or template for how to solve a problem that can be used in different situations. It allows reuse of knowledge or work, harnessed in the pattern, increasing agility while reducing errors as the patterns have been proven to work before.
The concept of using software design patterns dates from the late 70´s, but got real traction in 1994 when the “Gang of Four” published the book Design Patterns: Elements of Reusable Object-Oriented Software. Since than many books on software design patterns have been published, extending into enterprise integration, security and service oriented architecture (SOA) principles. A good example of SOA patterns is for instance the SOA pattern community, with over 200 unique patterns.
Patterns and Cloud Computing
Cloud computing allows using infrastructure assets like compute power, storage and network as a managed service. The well known infrastructure as a service (IaaS) cloud consumption model. The platform as a service (PaaS) cloud consumption model delivers managed applications, reducing the worry about maintaining the underlying operating system and application.
Commoditized IT services, like cloud computing offers, are ideal for orchestrating complex infrastructure or application landscapes using reusable services. To do so we identify different workload patterns:
- Virtual Appliances
- Virtual System Patterns
- Virtual Application Patterns
To make the use more tangible I’ll use an eCommerce platform as a repetitive example. The eCommerce platform consisting of two web servers, two application servers and two database servers. Now let’s see what a difference the patterns can make for this example.
A virtual appliance is basically any combination of an operating system with a (set of) application(s) as a predefined image. This image is automatically configured during provisioning to allow it to run as a virtual appliance.
Example: Using the eCommerce platform example, a virtual appliance could be the image for the web server, build with Red Hat Linux as operating system and Apache HTTP as application software. During provisioning of the image, the virtual appliance receives a unique hostname, IP adres, Apache HTTP (application) configuration and content to host.
Benefit: Normally each server in each phase of the lifecycle, development, test, acceptance and production, needs manual building and configuring. Using virtual appliances, this only needs to be done one time to create the image. This image is than provisioned as many times as needed, at the click of a button. This reduces the time needed to deploy new web servers and makes the process less error prone.
A virtual system pattern is a topology, an arrangement of various elements, of virtual appliances and scripts. The topology can be seen as the blueprint for a certain combination of virtual appliances including the interaction between them. This takes the practical use of patterns one step further, allowing you to provision and configure multiple images at once repetitively, each time using the same blueprint.
Example: Again using the eCommerce platform example, the complete combination of the web-, app-, and database servers are harnessed in a single virtual system pattern. The eCommerce platform pattern than specifies to; provision the web server virtual appliance twice, including load balancing for redundancy; provisioning the application server virtual appliance twice, clustered for redundancy; and provisioning a database server virtual appliance twice, one as active and one as passive for redundancy.
Benefit: The virtual system application (topology) can be used to easily provision the complete eCommerce application landscape at the press of single a button. This ensures 100% repetitive results when provisioning the eCommerce platform across the life cycle; development, test, acceptance and production.
Virtual application patterns, in contract to virtual system patterns, are application-based patterns instead of infrastructure-based. This application-based pattern type of pattern consists of components, links and policies. Components can be seen as managed platform services like “database” as a service, “enterprise application” as a service and “web application” as a service, links are the connections between the components and policies describe specific configurations of the components like elastic scaling and logging.
Example: Using the eCommerce platform example one more time, you can for instance replace the provisioning of the two database server virtual appliances in the topology above using a “database” platform as a service. Actually, you could replace all three virtual appliances with just a topology of a web service, application service and database service. Note the word service, this is essential for virtual application patterns. Lastly, this type of pattern also allows you to configure automatic scaling, both up and down, of the required capacity: configure the web service to automatically provision additional capacity based on the actual load generated by users on the eCommerce platform.
Benefit: With virtual application patterns you start using managed platform services into our topology. Where virtual system patterns allow deployment of a complete topology in one go, you still need to maintain all the different software components you provision. With virtual application patterns you remove the (one time) effort to create the virtual appliance image as well as the (repetitive) maintenance of all deployed virtual appliances.
How to start using these patterns?
These patterns are all available for use on both the IBM private cloud products, for instance on PureApplication™ Systems, and IBM public cloud services like SmartCloud Application Services running on-top of SmartCloud Enterprise. The IBM Workload Development Plugin Kit describes how you can start creating your own patterns.
A very good resource on how to apply this type of patterns on IBM’s cloud services is Dominique Vernier’s blog posting Create your own pattern-type on PureSystems/SmartCloud Application Services (Education series). Another indepth resources is developerWorks whitepaper Discover PureApplication System patterns of expertise. Happy pattern designing!