And just what are these services? Though they vary from provider to provider, these are the five core services which I view as foundational to PaaS:
- Deployment Automation: The PaaS provides a way to take your code - for example your Java application - and then get it deployed across a number of machines in different data centers in a completely automated fashion. In Heroku, this is done with a git push. Heroku monitors your repo and once you push an update, it extracts it, distributes it to the various machines that will run your code, makes sure the JVM is up and running, and starts your app. Contrast this with AWS (which does not provide this capability). On AWS you can spin up a VM, but they its your job to get your code onto the VMs, make sure the JVM is there, and so on. A PaaS does all of that for you.
- HTTP Request Routing: PaaS is really tuned around web services. The PaaS will provide its own HTTP reverse proxy, handle DNS configuration, TLS termination, and make sure requests for an HTTP URI are routed to a running instance of your code. As a developer, you no longer need to worry about any of that. Just write your web app, and the platform will get the queries to a running server.
- Scale and HA: If you write your app in the right way - namely, using stateless web services that store all persistent state in a shared backend database - the platform can provide scale and high availability. It can turn up as many instances of your app as is needed to handle the incoming request load. It can handle failed machines or server instances, and restart them for you. If a DC fails, through DNS it will route traffic to a backup DC to running instances of your code that are there. The trick to making this magic work is writing your app correctly and doing a good job on your database selection and schema design.
- Data Storage: The PaaS will also provide databases as a service. This means there are databases up and running that you can access via some kind of protocol interface. This might be RESTful access (as in the case of Amazon S3 or Azure storage services), SQL queries for a relational database, or whatever the query protocol is for a noSQL database. As an application developer, you do not need to set up, run, or configure this database. The PaaS provides it for you.
- Application Upgrade/Downgrade: A cloud service needs to always be available. If you want to upgrade your cloud software, you cannot take everything down and do the upgrade. A PaaS will typically provide some kind of rolling upgrade capability, where you can install a new version, test it while the old is still running, and once everything looks good, do a cutover to the new service instance. And then if things fail, you can roll back.
In addition to these core five, the PaaS can provide other services:
- Logging - log collection, storage, and analysis tools
- Developer tools - integration with developer tools (e.g., Azure provides integration in Microsoft Developer Studio)
- Monitoring services
- Metrics and dashboards
- Message bus services
- And more.
All of this used to be the stuff that made writing server side software hard. With PaaS, these hard problems are solved for you and you can focus your energy on the business logic of the app itself.
PaaS is the operating system of the cloud, and it is the future of how server side software will be built. The race is now on - who will be the leaders in providing PaaS services? Like operating systems, apps are "sticky" to their particular platform and require porting to go from platform to platform. As the set of APIs and services for PaaS's grow, the choice of PaaS becomes more crucial as the costs of porting go up. This is one of the benefits of open source PaaS offerings like Cloud Foundry - instead of being wed to the APIs of a particular vendor, the APIs are defined by a community and can be improved by contribution.