Chapter 8. Why Not PaaS?

Much of this book has focused on the benefits of PaaS and the compelling reasons why you might consider using a PaaS provider. But this chapter will take a look at the other side of the coin: in what situations might PaaS not be advantageous?

The answer depends on who you are and where you are coming from. If you are a developer within an enterprise, if you are working in a small- to medium-sized business, or if you are an independent developer or a hacker, the constraints are very different. In each of these cases, you’ll be looking at Platform-as-a-Service through different lenses. And through those lenses, you’ll also need to consider the pros and cons of the two very different ways to use PaaS: the public cloud PaaS and the private cloud PaaS.

Public Cloud versus Private Cloud

The public cloud usually runs on a public Infrastructure-as-a-Service platform (e.g., Amazon Web Services), and that’s where you’ll find PaaS providers like Heroku, EngineYard, and AppFog. In many PaaS options, you do not get to choose where exactly your code is run. You don’t have much control over what is going on in the service, nor do you get to see the underpinnings of the operating system. You provide the code and the PaaS does the rest. The downside is that you do not get to have much insight into what is actually going on in the servers.

What Is Private Cloud?

In general, the term ”private cloud” refers to a cloud computing platform that runs on hardware you control. Private cloud, however, is a controversial term. Some people even claim it does not exist, because they say it’s not cloud if you are running it yourself. Others say that if you put IaaS or PaaS technology on servers you own or manage, that is sufficient to call it cloud.

For the purposes of this section, we will assume that private cloud means running IaaS or PaaS technology in an environment where you own or manage the servers.

Private cloud PaaS is less familiar to most developers than its public counterpart. When people think about PaaS, they generally think about public PaaS. It is the PaaS that most people are more comfortable with.

Private PaaS takes many different forms, but essentially it involves running PaaS on your own hardware, possibly directly on servers that you own. It can run on top of an on-premise IaaS platform, like OpenStack, vSphere, CloudStack, or Eucalyptus, or even directly on your unvirtualized hardware. The difference is that typically with private cloud PaaS you are the one running the PaaS code and you have to manage the code itself.

People running private cloud as opposed to public cloud PaaS get similar functionality and deployment mechanisms for the running of applications, but they are responsible for operating the PaaS code and making sure it stays running. This gives you added flexibility because you get more control over the servers; you can use your own servers and you do not have to be tied to a particular infrastructure provider.

There are some providers, like AppFog and OpenShift, that can actually run on both public and private clouds; these providers let you choose whether you want to host your applications on your existing dedicated infrastructure or on a public cloud. However, many of the other PaaS providers do not provide that choice.

How to Choose: Small- and Medium-Sized Businesses

If you are working for a small- or medium-sized business, the restrictions for where your code is run are generally somewhat flexible. You have some say in where you get to run your applications. Typically, privacy concerns are not as strong and security concerns about the public cloud are not as worrisome as they can be for big enterprise developers. This gives you more leverage in picking which one you feel is correct for your development. However, it is still a good idea to at least consider some options of flexibility. Make sure to check with your bosses to see if there are any strong opinions one way or another about public and private cloud in the future.

As an independent developer, you have all the choice in the world. Surprisingly, you still might want to think about private cloud options, especially if you are a tinkerer. Installing Cloud Foundry (PaaS) or OpenStack (IaaS) on your own systems is definitely very hard, but it can also be a lot of fun to figure out how they work.

Many independent developers often want things to just work and not to have to worry about maintenance; for most independent developers, a public cloud PaaS is the right choice. You don’t have to worry about servers or networks dying and keeping up with operating system patches. On the other hand, as an independent tinkerer, you may be curious about how it all works, or want to have more control, or want to be able to change things slightly or drastically. A private cloud can give you that flexibility. Being able to look at the source code, make changes, then run those changes can be very empowering.

In that light, let’s look at some options for private cloud PaaS.

Open and Closed

In the arena of private cloud PaaS, you can choose between open source and closed source options. Enterprises and independent hackers can evaluate both.

For example, Cloud Foundry is an open source project that can run many different technologies. It does not care where it runs or how it runs. In fact, you can run it on your laptop and get PaaS functionality. The downside is that running it in production is very, very hard. It is a large distributed program and scaling it is a very difficult problem. There are providers like AppFog and Tier 3 that will do this for you, but you can also do it yourself.

Another open source tool is OpenShift by Red Hat. It is also something you can tinker with and run yourself, but it has different architecture than Cloud Foundry. You can get managed versions from Red Hat. For the independent hacker, these two options are the leading open source ones.

Cloudify is another open source PaaS. This one is aimed more toward enterprises than independent developers, and GigaSpaces (creator of Cloudify) has commercial support for it. While it is more geared toward Java, it does have support for some other technologies. (Compare Cloudify to choices such as Cloud Foundry, which have strong support for many technologies: Java, Node, PHP, Ruby, Python, and many others.)

Apprenda is a closed source PaaS specifically built for .NET. It has the added benefit of some runtime .NET functionality that no other .NET PaaS provides.

Here are some resources for getting started:

How to Choose: Enterprise Businesses

Many enterprises and large businesses have strict data restrictions; they cannot let data leave their data centers. So when an enterprise is evaluating Platform-as-a-Service options, the public cloud PaaS providers are usually nonstarters because they cannot connect to the data sources they need to. This precondition makes private cloud PaaS a more viable solution for most enterprises, so developers within large enterprises will have to convince their technical leaders to bring PaaS in house.

However, for some use cases within large businesses, the public cloud is being increasingly accepted as a viable option—e.g., for running applications that aren’t operationally critical and data sensitive. The three areas where the most public cloud adoption is happening within enterprises are mobile, social, and consumer web applications. These kinds of applications tend to be able to work without as much sensitive data; therefore, in these instances public cloud options are more acceptable.

As a developer, it is incredibly important to be careful when considering your options. Before you commit to a PaaS provider, it is very important to know whether it has an on-premises, private cloud offering. If you start out with a public cloud PaaS that cannot go on-premises, you might end up being told that you need to use a completely different PaaS. That could make your development much harder and involve a lot of transitions because the enterprise might have picked a private cloud PaaS; they might force you, at some point, to move to that one. If you choose a PaaS that has both public and private cloud offerings, you will have more flexibility in case there is a time when you need to go onto a private cloud; the same interface that you originally wrote will continue to function.

The Limitations of PaaS

Platform-as-a-Service has many benefits. But since this chapter is about PaaS limitations and why it might not be right for you, let’s get negative for a few pages.

As a developer, PaaS can make your life easier. It can help you run and scale applications with fewer worries and less overhead. But it has limitations and boundaries in functionality, both in terms of what you can do with your code and also in what kinds of applications are best run within PaaS.

The limitations look and feel different depending on where you are coming from, where you work, and what you are using it for. If you are just looking at it from a coding perspective, there are a number of drawbacks. A general lack of filesystem support means that you need to think ahead for scaling multiple instances of your site. Other limitations: sometimes you have to write code specific to the platform, which makes it less portable, and sometimes you get less insight into how it is running.

Many of these technical limitations may improve over time. As various generations of PaaS move forward, we might see some of these tactile limitations go away. However, there still are other limitations that are going to be harder to deal with.

Fitting Your App into the Mold

As a developer, you have to think hard about what kind of application you are trying to build and whether it fits into the PaaS model. High-frequency trading applications for the stock market are never going to be an ideal use case for Platform-as-a-Service. Super-high-performance situations in which every microsecond is critical may not be ideal for PaaS for a long time. PaaS really is intended to solve some hard problems, but in the process it only addresses applications that fit within some sort of standardized molding. The more you get fancy and try to add many different kinds of features and functionality to a single application, the less likely it is to fit into the PaaS model.

Here is one example in Node. Developers sometimes build Node applications that open two network ports at the same time, accepting data from each port independently, with both feeding into one single application. A typical standard for PaaS is to have only one port open to the Internet, and that doesn’t fit the mold for this kind of application, so building apps like this does not typically work well within Platform-as-a-Service.

Monolithic applications that have a big filesystem, a lot of functionality, and use many gigabytes of RAM are also not ideal candidates to work within the limitations of PaaS. When it is hard to decompose applications into smaller components and services, it tends to be harder to justify running them within a PaaS. Trying to debug deep problems in complicated apps running in production, depending on which PaaS you are using, can be very difficult and frustrating. This process really lends itself best to local development environments so that you can dive into some of the runtime details that are not available within a production environment.

More Considerations

Another limitation involves building distributed applications on PaaS. With highly distributed applications, you have to be aware of the message bus and understand whether your PaaS allows the message bus technology you depend on to connect your distributed applications. Whether you are using a message queue system or a database system in your distributed application, making sure that the pieces that you need to glue together are all well supported within a PaaS environment is another consideration.

Other limitations might be institutional. If you are working within a small- to medium-sized business or an enterprise, there may be an operations team who is responsible for running your applications and you might not even have a choice. There are cases where you can do your own development on a PaaS and hand that app to the operations folks, and they will get it working without a PaaS. So sometimes you can do your development in a PaaS and not have to worry about how it is ultimately deployed. But other times this becomes a problem; the cultural boundaries of what your operations team allows you to do will prevent you from running applications in a PaaS environment. We’ll take a further look into cultural considerations later in this chapter.

Also consider the services and databases that you are using. If you are building an application that is going to require master-master replication and high availability, and if your system is going to require many gigabytes of database storage, you should think about these factors up front and make sure that the PaaS you choose supports your requirements. If you can’t trust that this will be the case, PaaS may not be for you at this time.

In general, you should always check with your bosses to make sure they know where you are running your applications; not getting the OK from above is another reason why you might not be allowed to use a Platform-as-a-Service. System administrators are the ones that get the phone calls at 4 a.m. if it all breaks, and they can sometimes be resistant to new tools and technologies, so checking with them is an important thing to do in any business.

If you are working in an enterprise or a government agency, the data restrictions can be very limiting, and that might prevent you from picking a PaaS. If you have to go with a private cloud PaaS, there might be limitations on what languages it supports and how well it supports them.

If you are dealing with high-performance tweaks, if you have to customize your version of Ruby, if you are changing the internals of your runtime (like PHP), some PaaS vendors may allow that flexibility, but some will not. If you need to custom-compile your own version of Python, PaaS might not be the right fit. If you need to use a certain kind of processor or a certain kind of hardware to run your application, it might not work with the PaaS you choose.

Ultimately, when you are weighing the limitations and benefits of PaaS, it is a matter of control. The more control you are willing and able to give up, the more PaaS functionality you will be able to leverage. So, the two sides of the scale are control and how much power you get from your PaaS. The degree to which you’ll experience the advantages of velocity, speed, and time to market will depend on how much control you are willing to give up. Typically, the more you are able to fit into the mold of PaaS, the less you have to worry about the running of your application.

Avoiding Limitations

It is easy to shop around to find a PaaS that fits your needs. One of the strongest points about PaaS is how easy it is to set up and try out. You should evaluate the ease with which you get your first application running. This is a good indicator of not only the quality of the service, but also how you are going to be interacting with that service going forward.

As an informed developer, perform a survey:

  1. Sign up for accounts on three different PaaS providers (most of them offer a free trial).

  2. After some exploration of the options, dig deeper into the two you like most.

  3. Deploy an application on both PaaS providers.

  4. Play with their core services. How much data can you put into the database? Can the core services scale up?

  5. Spend time delving into the service’s functionality. Do you need a message bus? Do you need queuing or caching services?

  6. Review the pricing structures.

  7. Present the results to your superiors or operations team. If you are a solo developer, you should already know which one you want to use by now.

Encountering Resistance

Developers love PaaS. But sometimes others groups within a business are more resistant to adopting PaaS. The boss might not have heard of it and could be scared of it. A system administrator might feel like it would be out of his control; he might feel his job is threatened. Operations teams might feel like it goes around them. Even other developers might have resistance. They might feel like they know better or they have different ways that they’ve traditionally done things; they may have heard of PaaS and might not have a positive a reaction to it.

When you are interacting with these different groups, the facts that you’ve learned in this book can be used to explain and disarm many of their concerns. Being up-front about both the benefits and the limitations, showing that you understand these, and explaining why PaaS is acceptable for your application needs can be very powerful.

Explain that you’ll be able to get your work done faster, that PaaS is more reliable and more scalable, and that you (and everyone else) won’t need to worry as much at 4 a.m. Explain that when you need to move into a hundred different instances behind your application, you can do so with a click. These can be compelling arguments. When you’re dealing with system administrators and operations people, be prepared to show that you understand the limitations of PaaS and its potential pitfalls (Table 8-1). Then explain how the PaaS provider you’ve chosen can help you manage the risk, and show them that you have plans to manage the limitations. Being prepared with these kinds of arguments can really disarm much of the resistance you may encounter within the operations and system administrator teams.

Table 8-1. Arguments for and against PaaS

PaaS benefits

PaaS limitations

The scalability of dedicated hosting

Large monolithic apps are problematic

The ease of shared hosting

Potential conflicts with data restrictions

Faster app development and deployment

General lack of filesystem support

N-tier is built in

Can’t handle super-high-performance situations

Backend is fully managed

Customizing runtimes can be problematic

Less up-front expense than your own servers

More ongoing monthly expense than owning your own hardware

  
  

Use the empty spaces in Table 8-1 to fill in some of the benefits and limitations specific to your applications needs. Many trade-offs have been discussed in the earlier chapters.

Putting the Limitations in Perspective

As we finish our look at the limitations of PaaS, it’s important to keep in mind that the next generations of PaaS are going to be more and more powerful. Platform-as-a-Service is just as important and disruptive a technology as virtualization was, and we are going to start seeing it becoming more and more standard. As it evolves, it’s going to become just as important in enabling technology as virtualization is today. By the end of the 2010s, it will be the de facto way to run applications at scale.

We have not yet seen PaaS powering big applications like Facebook and Twitter. Certainly the limitations we’ve discussed in this chapter show why PaaS is not suited to these types of applications. It was built for lower levels of scale. It will help you get on your way to becoming a Facebook or a Twitter, but we haven’t seen PaaS used at that large a scale before. While you won’t see that happen today, PaaS will eventually arrive at the point where it will be powering the next mega-successful app.

The benefits of PaaS are going to continue increasing and the limitations are going to keep decreasing. And though there may be reasons today not to choose to run applications on PaaS, the forward thinkers that do end up running their applications on PaaS are the ones who are going to be getting their jobs done faster than their compatriots. They are the ones who are going to be getting promoted for making better choices and gaining recognition as forward thinkers—as the ones who are building for the future.