Every customer today demands that the application to be build should be Cloud Ready and with no or minimum changes they can run on Cloud. Building an application to run on the cloud is becoming a common task. The prerequisites step is that the application is first built as “Service Enabled”.
Service Enabled
The application’s functionality needs to be exposed to the outside world through services[1], i.e. not requiring knowledge of the application’s inner workings, not resulting in side effects, and using an interface that will change very little over time. The same holds true within the applications when exposing (sub) components to each other. Service design is the way to build applications. Following are the important Design Principles, Standards and Best Practices for Service-Enabled applications eventually to build Cloud Ready Application.Asynchronous / Parallel Programming
Parallel programming in which a unit of work runs separately from the main application thread and notifies the calling thread of its completion, failure or progress. Task-based Asynchronous – Which uses a single method to represent the initiation and completion of an asynchronous operation.Loosely-Coupled
All applications and services are self-contained and “loosely coupled”, Services maintain a relationship that minimizes dependencies and only requires that they maintain an awareness of each other. Standardized I/O – All data provided to or by the (subcomponents of the) applications are transferred through standardized interfaces, both in structure and technology. These interfaces should be designed in such a way that:- they will change very little over time
- they are backwards compatible whenever possible
- Ease of use
- Configurability
- Performance
- NuGet Support etc.
Stateless
Design scalable services by separating them from their state data whenever possible. Stateless – Avoid session state and if states are required then moved to external component i.e. Cache.Idempotance
Ability of a service to produce the same outcome after calling it multiple times. Idempotent – An operation is idempotent in case it has no additional effects if it is called more than once with the same parameters.Secure Data
Applications are based on secure lifecycle standards and include built-in security. Secure Data in Transit – Secure network protocols, such as SSL and HTTPS, must be used to prevent network traffic snooping or man-in-the-middle attacks. Secure Service / API – Authentication and Authorization mechanism ensues that applications and services are only accessible to the clients that should have access to them. Secure Data at Rest – Data at rest are encrypted.No indeterminate states
A method or service must always behave in a predictable way, regardless of the context in which, or the parameters with which, it is called. Note that this “predictable way” maybe an error return (with a meaningful error code or message). Once the application is Service Enabled it will further be extended to be built as Cloud Ready.Cloud Ready
The application need to be designed and written in such a way that they can be deployed in a cloud environment. Following are the Cloud Service Models. For building a Cloud Ready application the focus will on Platform as a Service (PaaS). Following are the Steps to achieve Cloud Ready Applications: Let’s first understand in summery the characteristics of Cloud.Cloud Characteristics
- On-Demand, self-service model – Cloud offers services On-Demand using self-service model. The management console or API’s exposed be the cloud provider enables to use cloud services as need arises. This offers convenience and flexibility to the consumers.
- Broad Network Access – The cloud services are available across common networks. In this way consumers benefit because they can use the services with the broad range of computing platform and devices.
- Dynamic Shared and Virtual Infrastructure – Cloud service providers have a business model incentive to leverage their infrastructure across as many consumers as possible. Providers offering shared hardware and shared OS multitenancy use server virtualization technology to create their shared infrastructure.
- Scale Rapidly and Elastically – From a consumer point of view, a cloud provider’s ability to quickly provision and de-provision IT services creates an elastic, scalable IT resource. Consumers pay for only the IT services they use.
- Meter Consumption – Providers meter the resources (for example, compute, storage and network) that cloud applications consume. Metering enables multiple pricing or chargeback models. These may include pay-as-you go plans, subscriptions, fixed plans and even free plans.