Going the PaaS Way: Develop Faster with Cloud Foundry

by Alexander BorovskyFebruary 6, 2014
Cloud Foundry is an open-source Platform as a Service (PaaS) that can run in a private environment.

Struggling with infrastructure complexity

Today, the complexity of information systems is growing day by day. They are becoming more and more complex not only inside, as the program code, but their architecture is getting significantly more complicated. It takes more time to spend on their creation and support.

First of all, this refers to the significant amount of work that needs to be done with the infrastructure part of a web application, if at some point the application stops coping with the load, it is necessary to deploy additional servers, install correct environment on them and, accordingly, support it. Most often, this is done using tools such as Chef / Puppet, by automating the creation of servers and the necessary environment on an IaaS—but all this requires additional efforts to maintain the application infrastructure and sufficiently high qualification of a developer or DevOps engineer.

In this brief post, we’ll look at the key limitations and requirements that must be observed when developing an app using PaaS and Cloud Foundry in particular.

 

How can a PaaS help?

Every day, applications and their architecture are becoming more complex and multi-component. That is why in the development of an architecture of a modern app it is required to invest significant time and financial efforts. This entails a decrease in the speed of development and its further rather non-trivial support. This is due to a significant amount of effort on the part of DevOps specialists when creating and maintaining scripts for installation.

Deploying an app with Cloud Foundry

It becomes increasingly difficult to test various aspects of the program’s behavior in production, because a developer does not have direct access (with the possibility of changes) to environments similar to production.

However, most of these problems can be easily solved with a Platform as a Service:

—Easy application deployment with a large number of copies (horizontal scaling)
—Significant simplification of the development of all stages of the app development (staging, testing, production) by creating a single environment
—Simple configuration of an app in all environments
—Minimal intervention of a system administrator or DevOps to the operation of a PaaS

 

Things to keep in mind

Constraints in the development of applications on PaaS are essentially the same as for any app that uses horizontal scaling in its work:

—It needs to be kept in mind that more than one instance of an application is involved into the development of the system.
—Stateless / Soft-state: the data necessary for processing the request must come in the request, stored in the session, or use cookies.
—Each instance of the application must minimize the caching of operational information, because it is difficult to maintain the cache coherency for different instances of the same application.
—Each instance of the application must be independent of others, stopping it or crashing it should not affect the entire application, or even the integrity of the application’s data.
—As the number of application instances increases, new instances must work without additional settings and, of course, independently of earlier instances.

In order to provide the work of the two latest points from the list, it is necessary to ensure the first three. Only in this case, changing the number of instances of the application, for example, to increase performance, will not affect the functionality of the entire application as a whole.

Using Cloud Foundry buildpacks

 

Conclusion

So, a PaaS (and Cloud Foundry in particular) enables to:

—Essentially simplife and structure the approach to the development of fairly complex, complex application architectures
—Significantly reduce the time for the entire cycle of development, testing and output to applications in production
—Reduce the cost of creating and increase the reliability of the architecture of the application being created

A PaaS in general and Cloud Foundry in particular can also provide high availability of an application: if some parts of the application fail, the remaining ones take on additional load, and the failed ones are restarted.

Creating and binding services on Cloud Foundry

 

Want details? See the slides!

This brief technical presentation will introduce you to:

1. The history of the Cloud Foundry platform
2. Why Cloud Foundry matters?
3. How to work with Cloud Foundry: deployment, app scaling, and using services
4. Developing with a PaaS: workflow for developers, DevOps engineers, and sysadmins
5. The architecture of Cloud Foundry

 

Further reading

  1. A High-Level Overview of OpenShift and Cloud Foundry: Features and Architectures
  2. Why Altoros Joins the Cloud Foundry Foundation
  3. Which of the New Cloud Foundry Features Save DevOps Time Most?

The post is written by Alexander Borovsky; edited by Kirill Grigorchuk and Alex Khizhniak.