Battle of the PaaS: PHP Apps in the Cloud
Battle of the PaaS: PHP Apps in the Cloud
This article examines the features, benefits and drawbacks of five of the most popular PaaS solutions: Heroku, Google App Engine, Microsoft Windows Azure, Amazon Web Services (AWS) and Engine Yard.
Join the DZone community and get the full member experience.Join For Free
Sensu is an open source monitoring event pipeline. Try it today.
Platform as a Service (PaaS) providers have grown rapidly over the last few years. Now you can choose from a number of robust services that can help you rapidly develop, deploy and manage your PHP application. To help you make sense of this crowded market, this article will examine the features, benefits and drawbacks of five of the most popular platforms right now: Heroku, Google App Engine, Microsoft Windows Azure, Amazon Web Services (AWS) and Engine Yard — and help you determine which option is best for you.
Heroku is a web hosting company that began with Ruby on Rails apps and now handles PHP, Java, Clojure, Go, Scala and Node.js. The service started operations in 2007, making it one of the pioneering cloud platforms. Acquired by Salesforce in 2010, it is free for small applications. If you get more traffic, you can expand your account and scale your costs economically.
Although there are cheaper providers, Heroku is well-known and popular. But Heroku can become expensive quickly when you order several dynos. Dynos are Linux containers that handle a single command — any command that is part of the default environment or in the slug, which is a pre-prepared and compressed copy of the app and related dependencies. One way to save money is to invest in additional services rather than defaulting to adding more dynos.
Heroku is ideal for building applications quickly. Setup is painless — much of the operation is hidden from you by design. The whole idea is to make the process simple. Heroku customers include Code for America, Rapportive, TED, Facebook, Lyft, Urban Dictionary, GitHub and Mailchimp.
Google App Engine
Google App Engine is ideal for creating scalable web apps and backends for mobile apps. You get a number of services and APIs including Memcache, NoSQL datastores and user authentication. Your apps will be scaled automatically depending on the amount of traffic they get, so you only lay out cash for what you use.
You do not have to worry about provisioning or maintaining servers. Services such as application logging, health checks and load-balancing allow you to deploy your app quickly. App Engine is compatible with common development tools including Git, Jenkins and Maven.
While Google App Engine is easy to use, it might also be considered a weakness. Many things are handled automatically, but if you want to customize it to your liking, you may be frustrated. Customers using Google App Engine include Gigya, NewsLimited, Mimiboard, Khan Academy, WebFilings, Best Buy, MetOffice, Getaround and CloudLock.
Microsoft Windows Azure
Like Amazon AWS, Windows Azure is really a combination of IaaS and PaaS. It supports PHP, .NET, Node.js, Ruby, Python and Java. You can utilize Visual Studio for building and deploying PHP applications. Options include an SQL Database, Blobs and Tables for persistent storage. You can administer your app with the command line or Windows Azure dashboard.
Because Azure is effectively both a PaaS and IaaS at the same time, you have a broad selection of components you can assemble for a custom solution, giving you lots of control over the process. On the other hand, Azure has a stripped-down administrative portal that may seem too sparse to some developers.
There are no upfront costs to use Windows Azure. You pay for only what you use, and there are no termination fees. Azure has been used by companies such as BMW, easyJet, HarperCollins, TalkTalk, Telenor, Toyota, Avanade, NBC Sports and Aviva.
Amazon Web Services
Although Amazon Web Services is better known as an Infrastructure as a Service (IaaS), it offers many of the features available on a PaaS. You can utilize the services available in Amazon AWS without resorting to building and maintaining application servers on your own. Because the AWS server is a raw OS, you can implement any language you choose including PHP, Ruby, Python and other languages. You can tap the power of Amazon Elastic Beanstalk for autoscaling, application health monitoring and automatic load-balancing.
You can use the AWS Software Development Kit for PHP library, documentation and code samples. At the AWS PHP Developer Center, you’ll also discover:
- How to deploy PHP apps on AWS Elastic Beanstalk and AWS OpsWorks.
- Access to white papers created by the AWS team on an array of technical topics including economics, security and architecture.
- How to connect with other developers via GitHub, the PHP Developers Blog, Community Forum and Twitter.
One great advantage is you can get started on AWS for free to give you hands-on experience. The Free Tier offers 12 months of service at no charge. You can employ any of the services and products within specific usage limits. Feature products include Amazon EC2 compute capacity, Amazon S3 storage infrastructure, Amazon RDS relational database service, AWS IoT for connecting devices to the cloud and Amazon EC2 Container Registry used to store and retrieve Docker images. One of the drawbacks of Amazon AWS is that you may need to handle more management than other PaaS providers. The AWS client list has included GE, Pinterest, Netflix, Pfizer and Nasdaq.
Engine Yard is for developers who are creating Node.js, Ruby on Rails and PHP applications and want the power of the cloud without the hassle of operations management. Many of the services are provided on top of Amazon AWS. Engine Yard itself is a run on Amazon. That’s why its strengths are management and orchestration more so than providing a deep bench of components. With Engine Yard, you can manage snapshots, administer databases, manage clusters, perform backups and do load-balancing. Engine Yard’s advantages include dedicated instances, lots of control over virtual machine instances and integration with private and public Git repositories. It is considered by some to be a “heavier” PaaS than Heroku, meaning they believe it should be used for more heavy-duty, serious applications.
One reviewer said that Heroku is nice for setting up apps quickly, but serious apps need Engine Yard. Not everyone agrees, however. Another reviewer reported felt Heroku was far better than Engine Yard, saying that you can install gem and have your app deployed in just a few minutes. Pricing for Engine Yard is a pay-as-you-go model. There are premium options along with standard setups. Pricing ranges from $25/month for a solo instance to $150/month for a standard instance and $300/month for a premium instance. Engine Yard accounts include Appboy, Vitrue, TST Media, RepairPal, MTV, Badgeville and Estée Lauder.
Review and Recommendations
So what have we learned?
- Heroku is easy to manage, well-known, simple to use and is great for building apps rapidly. It can get pricey, so you need to manage dynos carefully.
- Google App Engine is well-suited for managing back-end operations of mobile apps and creating web apps that can scale. Although simple to use, it is not easy to customize.
- Azure has gained market share quickly by providing lots of components and user control. Its hybrid IaaS/PaaS personality allows both Windows and Linux users to find a solution on the platform.
- Amazon Web Services is a proven system that has recently cut prices due to competition from Azure and others. There are many support and educational resources to tap into including the Developer Center, a blog for programmers and an online forum for community members.
- Engine Yard has excellent management and orchestration tools, as well as great support and robust scaling options. It can be harder to master than other platforms, but is excellent for those new to PaaS platforms that need more support to get up and running.
Adoption of cloud technology will continue to grow as organizations shift apps from internal data centers to the cloud to cut expenses and become more nimble. These five PaaS platforms will help you get your PHP app up and running quickly to take advantage of the on-going move to the cloud.
Choosing the Right PaaS
Choosing the right PaaS comes down to evaluating your cloud goals and the needs of your developers. Start with your target language, in this case, PHP. Every layer of the LAMP stack has more depth than ever before, and most PaaS providers are language agnostic, even if they initially supported only a single language.
Also, consider if you will benefit from a PaaS that functions as a quasi-IaaS/PaaS. Hybrid models provide several advantages. For example, you may have a database that is too large to handle in the cloud and is better suited to be located on-site. A hybrid approach lets you access local data from the cloud quickly. One disadvantage of this setup is having to worry about configuring an abstraction layer, which means your team needs the training and know-how to maintain it.
Other considerations are: How will you achieve scalability? Will you be able to move apps quickly away from your PaaS if needed? PaaS does not always mean development in the cloud. The advantage is simple deployment of applications which saves you time, money and hassle with your next PHP web application.
Published at DZone with permission of Omed Habib , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.