Tools Jelastic Lead image: Lead Image © Melinda Nagy, 123RF.com
Lead Image © Melinda Nagy, 123RF.com
 

Jelastic: Java and PHP as a service

Jump Start

The Jelastic cloud service is specifically designed to run Java and PHP applications. The service impresses with its technical finesse, thanks to immediate, load-dependent scaling without admin intervention. By Martin Loschwitz

Companies are often wary of booking external cloud services that involve storage of data on servers abroad, either because of compliance requirements or because of concern about the safety of data sent off-site. The Prism surveillance program and programs like it certainly have not done anything to dispel this skepticism.

Meanwhile, the number of as-a-service offerings by local service providers continues to grow, including some by smaller providers with smart ideas. For example, Jelastic, a platform-as-a-service (PaaS) solution [1], hosts the entire infrastructure users need to run PHP and Java applications.

Testing of the Jelastic service for this article was hosted by dogado GmbH [2]. The public Jelastic cloud resides in a TÜV-certified data center operated by Host Europe [3] in Cologne, Germany, and it was designed to counter increasing concerns among corporate users in Germany regarding data protection, in that the jurisdiction of the Federal Republic of Germany applies exclusively.

When you use the Jelastic service, you will note that the manufacturer understands customer expectations for public cloud computing: After you create an account on the Jelastic site, access credentials are mailed, and you can pay by bank transfer or credit card before using the service. Self-service obviously plays a major role in Jelastic. After unlocking your account, you are given access to the Jelastic dashboard that controls the services you use within the Jelastic cloud.

Understanding Cloudlets

The service is based on technology from Parallels [4], which calls appliances "containers" ("cloudlets" in Jelastic parlance), which are separate areas on the host system provided with their own, limited resources.

A Jelastic appliance is therefore not a genuine virtual machine, but rather an encapsulated application that cannot independently access the resources of another cloudlet. This arrangement keeps applications from influencing each other, contending over resources, or stealing data.

Scalability as a Core Function

A service can scale in two ways: horizontally and vertically. Vertical scaling extends or removes existing systems to create additional resources or replaces them with either more-powerful or less-powerful systems. The number of systems does not change. In contrast, horizontal scaling involves matching the number of available systems to the workload. Vertical scaling naturally reaches its limits when a computer can no longer be extended. Horizontal scaling works fine until the entire computer pool is overloaded.

According to dogado [5], the Jelastic platform scales both vertically and horizontally. Either a cloudlet is provided with extra cloudlets on the fly or the host-side hypervisor adapts the quantity of available resources, or both.

The difference for the customer is noticeably reflected in billing; the customer typically pays for the PaaS performance used. Cloudlets at Jelastic are charged a base fee once an instance starts. The customer thus determines how many virtual servers an appliance should include.

Horizontal scaling is handled by the platform itself at run time: If an appliance notices that its resources are scarce, it automatically requests more power from the hypervisor. In practical terms, customers do not have to worry about performance, as long as they have not undersized the maximum number of cloudlets. The platform automatically absorbs peak loads with the described horizontal scaling method.

In our lab, the provisioning and scaling operations worked well, as a test in which several parallel wget processes in an infinite loop served to prove. As the load increased, the number of cloudlets in use rose to the limit previously selected in the dashboard.

Hello World

During the first login after registering with Jelastic, the user is given access to a wizard on the dashboard (Figure 1); the wizard in turn offers more or less useful tips. During initial setup and during normal work, the wizard is backed up by detailed documentation of a remarkably good quality.

The bespectacled wizard guides you through the setup. The classical documentation is complete and useful.
Figure 1: The bespectacled wizard guides you through the setup. The classical documentation is complete and useful.

To begin, the customer must decide what type of appliance is desired: Java or PHP. For both variants, the admin can also request an SQL or a NoSQL database. A single cloudlet with a MySQL database and Tomcat comes for a basic fee of around EUR 28.50 (EUR 24 without tax) per month (Figure 2). At the end of the setup process, which takes less than two minutes, the customer receives a complete MySQL Tomcat VM in which the sample project "Hello World" is already deployed.

The Jelastic wizard in the dashboard guides you through the task of setting up an initial environment, including a database.
Figure 2: The Jelastic wizard in the dashboard guides you through the task of setting up an initial environment, including a database.

Premium Software Technology

Jelastic can be justifiably proud of its array of supported programs: If you use the platform for Java applications, you can look forward to support for Tomcat with Java 6 or Java 7 (Figure 3), with Jetty or GlassFish 3 as alternatives.

Although this looks like Tomcat, it is in reality Nginx, which the user adds in the dashboard to the instance by simply pointing and clicking.
Figure 3: Although this looks like Tomcat, it is in reality Nginx, which the user adds in the dashboard to the instance by simply pointing and clicking.

PHP 5.3 and PHP 5.4 are available in combination with Apache for PHP applications. Additionally, in terms of databases, you have a choice of MySQL, MariaDB, PostgreSQL, CouchDB, and MongoDB. The user can activate MySQL's built-in master-slave clustering function directly in the dashboard. The platform implements load balancing on request via Nginx.

After the initial setup, a complete Java or PHP appliance is provided in a working default configuration (Figure 4), but if you need special MySQL or PHP settings for your project, you can configure them using the Jelastic dashboard. In this way, Jelastic can cover a really wide range of applications in a single cloudlet.

Although the color scheme probably requires some getting used to, the Jelastic dashboard is clearly designed throughout and is functional in exemplary ways.
Figure 4: Although the color scheme probably requires some getting used to, the Jelastic dashboard is clearly designed throughout and is functional in exemplary ways.

Management by Mouse

The testers were genuinely thrilled by the management functions. On the PHP and Java playing field, virtually all functions can be activated or deactivated with a few mouse clicks (Figure 5). For example, if you want to add high availability to the default setup after the first login, simply select that option for your environment after pressing Create Environment. After a mouse click and a wait of a few seconds, Jelastic starts a second instance with an identical configuration – but now the setup includes an Nginx-based load balancer.

Applications are modified and extended by clicking in the dashboard.instance by simply pointing and clicking.
Figure 5: Applications are modified and extended by clicking in the dashboard.instance by simply pointing and clicking.

Configuration Files

If you want the site to be publicly accessible via IP, just turn the IPv4 function on in the web interface to allocate a routable address. If you want your appliance to be faster, Memcached might be helpful; just click, and you're done. SSL certificates are no longer a problem, and the same applies to creating a host for Maven, the Java build tool.

The solution for editing configuration files is also smart. Services that customers enable for their Jelastic environments appear in a list that exists specifically for each environment. From the small toolbar of icons, you can open an editor window to configure changes that reflect your needs (Figure 6).

If the default MySQL configuration is not to your liking, you can edit my.cnf directly in the Jelastic dashboard.
Figure 6: If the default MySQL configuration is not to your liking, you can edit my.cnf directly in the Jelastic dashboard.

Clicking Save terminates the action and returns to the Dashboard main window. In this way, it is possible for an admin to change the configuration files of all services – separate shell access is not provided.

Price Structuring

Jelastic is available from hosting companies worldwide [6] in North and South America, Russia, Japan, various European countries, and so on, with as many pricing models.

For example, dogado, the provider used here, offers several service levels from standard to premium support, with a 24/7 service-level agreement at a surcharge. Dogado is obviously targeting business customers who are looking for a platform for their applications and need support in line with enterprise standards but who are not necessarily IT geeks.

The dogado tariff system treats each computing service as a cloudlet, which is equivalent to 128MB of RAM, 200MHz of CPU, and many multiples of EUR 14 per month. For example, the manufacturer rates the initial application created on first logging in to the web interface system with Tomcat 7 and MySQL as a two-cloudlet setup. As operations then begin, the math becomes more complex, although the dashboard helps you understand how the costs are accruing.

The promise to bill resources exclusively on the basis of actual usage is, in part, eroded by the fact that Jelastic reserves cloudlets for specific services, for which the customer pays regardless. For example, after enabling load balancing, if you enable all the available functions for just one instance, you are practically booking 11 cloudlets, for which you can expect to pay at least EUR 82. Only the cloudlets incurred for the purpose of automatic vertical scaling are actually billed dynamically by the provider.

To prevent your setup from turning into a cash sink, you can define an upper limit in the dashboard that Jelastic's automatic scaling feature will not exceed. The complete setup described in this article will cost about EUR 340 gross (about US$ 470). However, this includes fixed charges for the IPv4 addresses used in the setup, which are charged a flat rate once the IPs are in use.

The question of whether Jelastic is worthwhile for a company depends on the expected load, but if the Jelastic application is not working continuously at full load, using it for a Java or PHP site could well be worth your while compared with maintaining your own server. This assumes that a standard web hosting service does not offer the functionality you need.

Conclusions

The services that Jelastic hosts could be run on your own server, whether physical or virtualized, but the use options would not be anywhere near as flexible. Additionally, you would have those unpleasant system maintenance tasks to take handle. People who rely on PaaS services typically want a system that "just works," and Jelastic is hugely flexible.

Just as important, Jelastic scales automatically when faced with unexpected peak loads within user-specified limits. Anyone who operates a website or an online store that is featured on TV one day and then overrun by customers the next, would probably fare much better with such automatic scaling than they would with their own dedicated system.

The technical implementation of the solution proved to be almost flawless. Everything worked as expected right off the shelf. The PaaS cloudlet setups for PHP and Java were easy to configure and expanded quickly and simply to include public IPv4 addresses, high availability, or load balancing at the press of a button. The exhaustive documentation round off the overall technical impression.

Less impressive was the pricing policy. Despite the discounts on offer, anyone who uses the smart environment seriously will rapidly reach financial regions in which leasing one or two managed servers could be a cheaper option.