Cloud Computing Basics—Platform as a Service (PaaS)

Mitesh Soni

Issue #238, February 2014

PaaS is a cloud service model that allows you to develop, deploy and run business applications swiftly.

Generally, good programming is considered to be the measured application of an art form, craft or discipline, with the objective of producing a competent and evolving business solution. In traditional environments, computer programming is a practice that has multiple phases, such as designing, developing, testing, debugging and maintaining application code. We programmers use programming languages like C, C++, C#, Java, Python and Smalltalk to create business applications. The process of writing code often requires proficiency in many diverse subjects, including knowledge of the application domain, runtime environment, specific algorithms, programming languages and proper logic.

Figure 1. Programming

In addition, developing and deploying applications is a complex, expensive and time-consuming task. Business applications require hardware resources, operating systems, databases, middleware, Web servers and other software. Once the technology stack and hardware resources are available, a team of developers needs to navigate frameworks, such as J2EE and .NET, for development. A dedicated team of network, database and IT management experts keeps resources and applications available.

Inevitably, business requirements will require changes in the application, which results in a lengthy development, testing and re-deployment cycle. Furthermore, large organizations need specialized facilities to house their data centers and a team to maintain them. A gigantic amount of electricity is used to power the servers as well as to keep them cool.

If you think the complexities end here, then wait. A failover site holds significant importance to mirror the data center so that information and resources can be replicated in case of disaster. Applications built with these complexities are difficult to scale for usage spike demands, fragile to update, and difficult to make mobile and social as business needs change.

Modern Application Programming and Its Challenges

Modern programming has changed in a different manner due to the explosion of devices. Expanding data and new business requirements need different approaches from the previous era. Considering either the traditional approach or modern approach, business applications must satisfy some fundamental properties, such as automation, reliability, robustness, performance and availability. Unfortunately, even in modern times, automated build and test environments don't exist in many organizations, and best practices are not applied everywhere in the software development life cycle.

It is important to understand that an application's reliability depends on the accuracy of algorithms, fewer programming mistakes, the implementation of security best practices, and avoiding logic errors, such as division by zero. Anticipating errors, such as incorrect or compromised data and unavailability of resources, increases robustness. How well application developers and IT teams manage robustness holds more significance in achieving the application's objectives. Efficiency, performance, maintainability, portability and availability of an application are equally important in modern environments. Cloud computing is a revolutionary approach that provides a ray of hope for organizations dealing with these modern challenges.

Introducing PaaS

Cloud computing is still an evolving paradigm, but it is one of the most disruptive innovations in the past few years. According to the definition from NIST, it is the model to enable convenient and on-demand network access to a shared pool of configurable computing resources, such as compute, storage and network, that can be provisioned rapidly and released with minimal management effort.

Figure 2. NIST Definition of Cloud Computing

Cloud computing is composed of three service models: Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). This article focuses on PaaS.

With PaaS, you can deploy applications into the cloud infrastructure using supported programming languages (such as Java, PHP, Ruby and .Net) and platforms/tools (such as Web servers/application servers and databases). This enables PaaS users or organizations to focus on their business and application maintenance rather than having to worry about managing resources, platforms and software versions.

PaaS resides within the space between SaaS and IaaS. IaaS provides network, storage and compute processing capabilities. Examples of IaaS offerings include Amazon EC2, Windows Azure VM Role and RackSpace Cloud Servers. SaaS delivers business software capabilities, such as CRM.

Figure 3. PaaS

PaaS includes not only the deployment environment, but it also includes repositories, build environments, testing environments, performance management, mail services, log services, database services, big data services, search services, enterprise messaging services and application performance management for modern application architectures and code inspection services.

PaaS is becoming popular because it eliminates the cost and complexity of acquisition, installation, configuration, evaluation, experimentation and management of all the hardware and software resources needed to run business applications. PaaS provides the infrastructure and platform needed to develop and run applications. By using PaaS, organizations can utilize budgets to develop applications that provide real business value.

PaaS is driving a new era of innovation and business agility. Development and IT teams use PaaS to design, experiment, build, test and deliver customized applications. Hence, application developers and IT teams can focus on application and domain expertise for their business, rather than managing complex hardware and software resources.

Benefits of PaaS

Two significant benefits of using PaaS are cost benefits and faster development and deployment cycles. PaaS provides agility, flexibility and faster time to market to the development, testing and deployment cycles and, hence, focus remains on the application and not in managing resources. It ensures access to resources from anywhere in the world. By using PaaS, user satisfaction increases, and at the same time, resource utilization improves. It provides underlying software and hardware resources on a pay-as-you-go billing model, so it reduces the capital expenditure associated with large amounts of server and storage space, power, cooling, management and maintenance of software updates and changes, and skilled personnel. With almost zero capital expenditure, horizontal or vertical scaling features can increase the application's performance. It does not involve local installation, so adoption speed is usually high. The PaaS platform ensures that consumers don't need to keep investing in OS upgrades and maintenance. It is the PaaS provider's responsibility to manage infrastructure and platform resources so organizations don't need to worry about licenses, versions of software, patch management and so on. Furthermore, flexibility and availability of resources improves collaboration between the development and testing teams.

Figure 4. PaaS Benefits

PaaS offers surprising benefits in deployment and management tasks considering the fact that most organizations opt for PaaS solutions based on the environment that is already standardized in their internal environment.

How to Deploy Applications in PaaS

Here are the basic steps:

  • Select the application type, programming language for developing the application, platform to run the application, build environment and so on.

  • Create business or Web applications using an IDE, such as Eclipse, NetBeans or any other IDE.

  • Create a database using available database products.

  • Change the database configuration accordingly in the application.

  • Create an archive file—for example, a WAR or EAR file.

  • Upload the archive file to the PaaS Portal.

  • Configure log, e-mail, backup and scaling services.

  • Access your application.

Major PaaS Providers and Offerings in Cloud Services

PaaS services provide an opportunity to increase customers, boost revenue, add value to existing services and gain broader adoption of cloud services among business customers. Application development is a core capability, while additional capabilities often play to the cloud provider's brand building and strengths. To prepare for the PaaS, cloud providers are developing flexible cloud platforms to support a variety of functions for the cloud environment and processes. Examples of PaaS include, but are not limited to, Force.com, Microsoft Azure, Engine Yard, Heroku, CloudBees and Google App Engine.

Red Hat OpenShift

Red Hat OpenShift is a PaaS with Apache License 2.0. It has built-in support for Java, Python, PHP, Perl, Node.js, Ruby and extensible functionality to add languages. OpenShift supports MySQL, PostgreSQL and MongoDB. It supports Web-application frameworks, such as Rack for Ruby, WSGI for Python and PSGI for Perl. For Java, it covers end-to-end support for Java EE6, CDI/Weld, Spring, Liferay, Scala/Play!, JBoss AS7, JBoss EAP6, Tomcat 6 and 7 (JBoss EWS 1.0 and 2.0), Glassfish as DIY, Jetty as DIY, Eclipse, JBoss Tools, Jenkins, Cloud9 IDE, Appcelerator Titanium, Git, SSH access, Maven 3 and Ant. Three versions are available: OpenShift Online, OpenShift Enterprise and OpenShift Origin. A free tier is available for OpenShift Online with 512MB of RAM and 1GB disk. OpenShift Enterprise is a private cloud version from Red Hat.

CloudBees

CloudBees supports Java SE and Java EE. It also includes Tomcat, MySQL, commercial relational databases, BIG data—MongoDB and CouchDB in its stack. CloudBees brings quite a few unique features into the Java PaaS landscape, especially continuous integration—an entire development/testing/deployment management in the cloud. Application deployment requires no special framework, and it is easy to migrate applications in or out and to or from CloudBees. Developers can use the Jenkins service to have CloudBees automatically and continuously build, test, check in and check out code in the repository. CloudBees supports command-line tools, IDE tools (such as Eclipse), a Web-based console, Web access to logs, third-party developer/testing services and API access. New Relic monitoring is a part of the CloudBees ecosystem. Users can turn monitoring on for any of the applications with a few clicks. In CloudBees, the New Relic monitoring agent is deployed automatically into your application at the time of deployment. CloudBees also supports sending mail from applications with the SendGrid Service for RUN@cloud.

Google App Engine

Google App Engine (GAE) is designed to run Java, Python, Go or PHP applications on the Google infrastructure. In GAE, applications run within a secure environment with limited access to the underlying operating system; thus, existing applications may require significant changes—for example, applications can't write to the filesystem. It provides native support for Google Cloud SQL and Google Cloud Storage. It supports automatic scaling and load balancing. The Google App Engine SDK for Java, Python, PHP and Go are available. Users can use the Google plugin for Eclipse to develop and deploy applications. App Engine Datastore provides a NoSQL datastore, with a query engine and atomic transactions. Google Cloud SQL provides a relational database service based on the MySQL RDBMS, while Google Cloud Storage provides a storage service for objects and files. For free usage, applications can use up to 1GB of storage and adequate CPU and bandwidth to support a capable application, which can serve around 5 million requests a month. It also provides simulation of Google App Engine on your computer.

Cloud Foundry

Cloud Foundry is an open-source PaaS developed by VMware and released under the Apache License 2.0. It is written in Ruby. Cloud Foundry supports the Java, Ruby, Node.js and Scala languages with runtime environments Java 6, Java 7, Ruby 1.8, Ruby 1.9, Node.js, Spring Framework 3.1, Rails and Sinatra. Cloud Foundry supports the MySQL and vFabric Postgres relational databases and the MongoDB document-based database. Users can use RabbitMQ, a reliable, scalable and portable messaging system for applications. Micro Cloud Foundry is a downloadable version of Cloud Foundry that can run on a developer's machine.

Heroku

Heroku is a polyglot cloud application platform that supports Clojure, Facebook, Java, Spring, Play, Node.js, Python, Django, Ruby on Rails and Scala. It supports PostgreSQL and MongoDB as SQL and NoSQL databases, respectively. Heroku aggregates three categories of logs: app logs, system logs and API logs. It is available in the US and EU. Users can use the maintenance mode to disable access to their applications for some duration of time, where it will serve a static page to all users. Users can enable SSL to ensure that all information is transmitted securely. Its production check feature is useful to verify application configuration against recommended criteria to ensure maximum uptime.

Windows Azure

Windows Azure is a PaaS offering from Microsoft. Microsoft released it in February 2010. Application developers can write code for it in different programming languages; there are definite SDKs started by Microsoft for Java, Python, Node.js and .NET. Microsoft publishes the source code for the client libraries on GitHub. For data storage, SQL Azure is a cloud-based scalable and highly available database service built on SQL server. Windows Azure Blobs provide storage for unstructured binary data. AppFabric simplifies connecting to cloud services and on-premise applications. For queued messaging, queues and service bus features are available. With the use of the caching and content delivery network, application performance can be enhanced. Broadcasters successfully used Windows Azure Media Services to stream the London 2012 Olympics. Windows Azure Active Directory manages user information similar to Windows Server Active Directory.

Amazon Elastic Beanstalk

Elastic Beanstalk is a PaaS offering from AWS to deploy and manage applications quickly in the AWS cloud. Elastic Beanstalk manages auto-scaling, load balancing and application monitoring. AWS Elastic Beanstalk supports Java, PHP, Python, Node.js, Ruby and .NET Web applications with the Apache Tomcat, Apache HTTP Server, Nginx, Passenger and Microsoft IIS 7.5 development stacks, respectively. It runs on the Amazon Linux AMI, Windows Server 2008 R2 AMI and the Windows Server 2012 AMI. Consumers can create 25 applications and 500 application versions. The application size can be up to 512MB. Users can use Eclipse and Visual Studio to deploy applications to AWS Elastic Beanstalk. Users can leverage the AWS Toolkit for Eclipse and the AWS Toolkit for Visual Studio for Java applications and .NET applications, respectively. Application files and optionally server log files are stored in Amazon S3. Amazon RDS, DynamoDB and SimpleDB can be used as a datastore, or users can use Oracle, Microsoft SQL Server or any other relational databases running on Amazon EC2.

Security in PaaS

It is essential that application developers are thoroughly experienced in application security best practices. This can include secure coding practices in the proffered language as well as in secure design principles. Unlike traditional application development, PaaS offers a shared development environment, so authentication, authorization and access control can be combined to ensure consumers' data and application security. It is also important to scan Web applications for common security issues, such as cross-site scripting (XSS) and SQL injection. To refine development efforts to produce secure and robust applications, application threat modeling is critical. OWASP threat modeling can be used to create secure applications.

Future of PaaS

Many IaaS providers are moving up in the stack of service models. AWS is one of the examples. Today, the market for PaaS may be the smallest proportion of the overall public cloud. But, it will have huge implications in application developers' roles and responsibilities. Nearly half of respondents (49.6%) to the 2013 TechTarget Cloud Pulse Survey said they chose the PaaS they did because it was part of a cloud ecosystem they already were using. Similarly, 43% of respondents said they based their decision on how well the PaaS would integrate with existing architecture. Now, PaaS providers have realized that it will be more beneficial from a market and competition point of view to run services across several IaaS providers' architectures. Some providers are providing private versions of their PaaS offering, so organizations can use the same services in their existing facilities to utilize existing resources in a better manner.

Mitesh Soni has been associated with the Cloud Services Team for the past three years, which is a part of the Research and Innovation Group of iGATE. Currently, he is working there in the capacity as Technical Lead. He loves to write on technical and social subjects, and he also enjoys photography. His technical blog is at https://abcdofcloud.wordpress.com, and his photography blog is at myvividvisions.com.