Archive for January, 2011

eXo Launches Cloud IDE for Amazon Elastic Beanstalk

Wednesday, January 26th, 2011

Cloud IDE will offer fully integrated development services to Elastic Beanstalk developers

SAN FRANCISCO, Calif. (Jan. 26, 2011) — eXo, a provider of Java user experience and portal technologies, today announced the eXo Cloud IDE for Elastic Beanstalk, the new Platform as a Service (PaaS) from Amazon that allows Java developers to deploy and operate their applications very simply on a scalable platform. The eXo Cloud IDE is an open cloud service that extends the Elastic Beanstalk runtime benefits into the development phase, making it simple for developers to access, view, edit and commit their code from any browser and deploy their applications with a single click. A beta version of the eXo Cloud IDE is available today as a free machine image (AMI), which can be added to an Elastic Beanstalk instance.

First released as a Web IDE in eXo Platform 3.0 in September, the eXo Cloud IDE is a standalone offering that has been updated for cloud services. It is tightly integrated with the Elastic Beanstalk platform to provide an out-of-the-box container for applications that can be deployed within the IDE. This includes mobile and social applications for platforms like Facebook, which can leverage the elasticity of Elastic Beanstalk.

The eXo Cloud IDE provides a robust development environment with features such as a full color-coded, context sensitive and auto-complete multi-file editor, with preview panel and, in the future, integration with source control systems like Git. The eXo Cloud IDE is an open editor and will be available on other cloud platforms beyond Amazon and beyond Java.

Benjamin Mestrallet, CEO and founder of eXo, stated: “We intend to make the eXo Cloud IDE a useful onramp for developers to take advantage of this new wave of Platform as a Service offerings from companies like VMWare/SpringSource, CloudBees, Google App Engine, Salesforce/Heroku and Red Hat as they release open alternatives to Amazon’s Elastic Beanstalk. eXo Cloud IDE is independent of other eXo components, but will easily integrate with future cloud services that eXo will be bringing to market later this year.”

The eXo Cloud IDE AMI is immediately available for free; instructions for configuring an Elastic Beanstalk instance to utilize this custom AMI are provided in the Cloud IDE installation guide. As eXo rolls out additional releases towards general availability in Q2 2011, future AMIs will be made available. eXo will be detailing tips on using eXo Cloud IDE in a free webcast, “Code in the Cloud,” on February 2 at 1pm EST.

Additional Online Resources

Taking a Look at Elastic Beanstalk, Amazon’s New PaaS Offering

Tuesday, January 25th, 2011

The following post is from Henri Gomez, IT Operations Manager at eXo.

Last week Amazon announced a new Java Platform-as-a-service offering: AWS Elastic Beanstalk. Here at eXo, we rely on several Amazon cloud computing services (S3 and EC2), so I was intrigued. Following a quick review of the Getting Started Guide and the Amazon Blog post, Introducing AWS Elastic Beanstalk, I was convinced that I had to take a closer look at the platform. This article is a summary of my initial impressions.

Getting Started

Since eXo already has accounts on AWS, I used our QA account to connect to the Elastic Beanstalk console.

When you access the service, Elastic Beanstalk asks you to create your application from an Amazon sample, or upload your own application (i.e., your web app).

Next you have to choose an application URL, provide a simple description, select the underlying AWS model (32/64bits Linux), then upload your .war file.

Basically, Elastic Beanstalk is an EC2 instance with a dedicated Apache Tomcat 6 web server.

The environment then initializes on the AWS infrastructure.

And after initialization, you see that it’s ready to serve.

In the previous screenshot you can see version history, since I uploaded 3 versions of our sample application. I had to do this because the first attempt resulted in Elastic Beanstalk reporting an error with our application. After some digging, I discovered Elastic Beanstalk is monitoring your application via a monitoring health URI. By default this URI is ‘/’, reminding you that it’s always a good practice to define a welcome-file in web.xml.

First Impressions

Elastic Beanstalk provides basic but useful tools to set up and monitor your application.

Logs

To get a log from a Tomcat operation, click Snapshot Logs.

The log file contains the typical Apache Tomcat logs:

Notes:

  • Elastic Beanstalk provides Apache Tomcat 6.0.29 with the Tomcat Native library 1.1.20 for better performance.
  • HTTP and AJP are available, but the Elastic Beanstalk front end does not use mod_jk or AJP 1.3 (more on this later).
  • Our application is renamed ROOT.war (sus the / in URI), which shows Elastic Beanstalk’s mono web app approach.

Monitoring

The available monitoring capabilities are basic but should cover general usage requirements.

Clicking on one of the graphs will show you more detailed statistics. Here you can see CPU usage:

And this panel shows status of your application:

Configuration

When the configuration is complete, you can define instance size, load-balancing, database, notifications and even JVM settings.

Instance Sizing

Load Balancing

  • HTTP/HTTPs front end and Health Monitoring URL:

  • Session Stickiness

Auto Scaling

This is the most important feature in Elastic Beanstalk, and where “elastic” becomes a true description.

  • Min/Max instances

You can start with a minimal instance, and fix max instances where your application will be replicated.

  • Scaling Triggers

Scaling Triggers determine how Elastic Beanstalk will decide to deploy more instances to handle the load.
Triggering Metrics could be networks, CPU or disk operations.

Databases

If your application needs database support, Amazon RDS (MySQL clone) is available for use.

Notifications

Notifications are important for any IT operations team responsible for apps in production.

The support is simple for now, and uses email notifications:

Container

This is where you’ll set your JVM environment, min/max heap, perm gen size, and specific VM flag.

Another nice feature is the ability to use AWS S3 to store log archives; since eXo is on AWS infrastructure, having log file rotation on S3 storage could be useful.

Notes:

We tested the default 32bits AMI provided by Elastic Beanstalk and discovered the JVM used is OpenJDK 1.6

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.1) (amazon-44.1.9.1.16.amzn1-i386)
OpenJDK Client VM (build 19.0-b06, mixed mode)

At this time, I don’t know if Amazon will provide other JVMs, i.e. Sun/Oracle, IBM or JRockit (maybe license reasons prevent them from offering others now?).

Stress Tests

I wanted to see how the Elastic Beanstalk instance performs, so I installed our Performance Meter web app on the instance.

PerfMeter servlet is configurable via URI parameters, so we could select the response wait time and size. In my test, the wait time and content were set to a minimal ‘OK’ string.

Of course, to reduce network latency, I connected to one of our EC2 instances on the same Amazon Area (i.e. US).

[hgomez@xxxx ~]$ ab -c 50 -n 10000 -k -H 'Accept-Encoding:gzip, deflate' http://exo-qa-perftest.elasticbeanstalk.com/PerfMeter?waittime=-1\&responsesize=10240
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking exo-qa-perftest.elasticbeanstalk.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests

Server Software: Apache-Coyote/1.1
Server Hostname: exo-qa-perftest.elasticbeanstalk.com
Server Port: 80

Document Path: /PerfMeter?waittime=-1&responsesize=10240
Document Length: 10240 bytes

Concurrency Level: 50
Time taken for tests: 12.81536 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1909
Total transferred: 104139566 bytes
HTML transferred: 102651967 bytes
Requests per second: 827.71 [#/sec] (mean)
Time per request: 60.408 [ms] (mean)
Time per request: 1.208 [ms] (mean, across all concurrent requests)
Transfer rate: 8417.64 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 7.3 1 83
Processing: 3 57 41.2 53 1433
Waiting: 2 39 37.5 33 1429
Total: 3 59 41.9 55 1434

Percentage of the requests served within a certain time (ms)
50% 55
66% 67
75% 79
80% 86
90% 102
95% 117
98% 134
99% 153
100% 1434 (longest request)

CPU / Networks loads reflect the load test:




Notes:

AutoScaling

Elastic Beanstalk performed pretty well, and scaled automatically, as reported by events status:

2 micro instances were reported by the EC2 control panel for my application:

On the HTTP side

  • The load-balancing system didn’t use HTTPd/jk, but instead used Amazon Load Balancing, Server Software reporting as Apache-Coyote/1.1 (i.e. Apache Tomcat HTTP stack).
  • The bad news: gzip compression is not enabled by default on HTTPConnector (easy to fix in server.xml).

Conclusions

My first tour through Elastic Beanstalk showed a solid Java application platform for the cloud, loaded with many features:

  • Simple configuration
  • Good monitoring features
  • Nice load-balancing, with support for SSL
  • Rich auto-scaling
  • Native S3/RDS support

And of course, you should be able connect to this EC2 instance using SSH KeyPair.

I’m looking forward to investigating Elastic Beanstalk further, both to understand how it works under the hood, and to learn how to customize it for eXo’s purposes.

Understanding eXo Versioning Scheme

Wednesday, January 19th, 2011

Each software package that eXo releases is flagged with a release number. This identifier follows a nomenclature elaborated to match our software release process. This post will help you to decipher these quite obscure numbers and hopefully better understand how we release our software.

This numbering system applies to our enterprise product offering, eXo Platform (as well as our previous offering, called eXo All-In-One). It also applies to our community project packages, eXo WCM, eXo Collaboration, eXo Knowledge and eXo Social, and even to our lower level software libraries.

Release numbers are composed of several version digits and an optional qualifier, following this pattern X.Y.Z[.P][-Q].

Let’s start with a full (fictive) example:

The major version digit represents the main generation of the software. We increment this version number for each major change in the product architecture.

The minor version digit is incremented when we augment the software with a new set of new features.

The maintenance version digit is incremented when we want to release batches of bugfixes and improvements. The first maintenance version number is always 0.

The patch version digit is optional and hopefully rarely seen. We issue a patch release when an annoying issue, such as a security one, can’t wait for the next release.

Finally, a qualifier may be appended to mark a special brew of the release, usually depicting a quality-level:

  • Alpha: alpha versions are made to mark milestones. Not all alpha versions are released publicly and they have usually very little QA. They are often developer releases. An alpha version is issued before the actual release, meaning that 1.0.0-Alpha01 will be a preview of a future 1.0.0-GA version.
  • Beta: beta versions are considered feature-complete, and have passed a minimal level of QA tests. Several betas may be issued as feedback is received from the developer community, and as the QA program progresses.
  • CR: CR stands for Candidate Release. As the name says, these versions are candidates for an upcoming release. A CR may have some outstanding known bugs, but nothing bad enough to block the release. Several CRs may be released until we are satisfied with the quality of the release.
  • GA: GA stands for General Availability. This qualifier is used to mark the software as ready for production. Usually, the first minor version is explicitly marked as GA (e.g 2.1.0-GA) but the qualifier is omitted for subsequent maintenance releases (maintenance releases are production-ready by nature).
  • CP: CP stands for Custom Patch. This is used for special versions that diverge from the usual release. Occasionally we are required to provide a release specifically for a certain use case scenario. For example, eXo WCM 2.0.1 needed a JCR 1.12.2-CP01 in order to be deployed specifically on JBoss Enterprise Portal Platform (JBoss EPP).

The list of qualifiers is not restricted to the above. Under special circumstances, we may use others. For example, since eXo products have a different lifecycle than the GateIn community project, we have our own maintenance branch where we forge bugfixes for our customers before contributing them back to the gatein trunk. For versions coming out of this eXo branch we will use -PLF qualifier.

Which version should you use?

At eXo, we don’t typically promote alpha releases outside of the company. They are technical milestones that are meaningful to our developers. For those eXo fans looking to satisfy their curiosity, we do make alpha releases available through our software factory.

With beta releases, we will sometimes promote them outside eXo — usually when innovative new features are introduced. Developers are encouraged to look at our betas and provide feedback. However, beta releases should never be put into production — they are unstable by nature and we cannot ensure they will not break your system. In addition, betas are not covered by our subscription support. Using a beta can be fine to build a demo, but not much more. We also recommend not starting a project on a beta version, with the expectation that eXo will release a GA by the time of your production target.

Use exclusively GAs and maintenance versions in production. Always upgrade to the latest maintenance version shortly after it is made available to you.

Finally, use CPs only if eXo advises it to you specifically. The CP versions are made on a case by case basis, generally if your production imperatives depend on it.

Introduction to CRaSH

Tuesday, January 11th, 2011

I’ve just written a new tutorial that gives a technical introduction to CRaSH, an open source project I lead that makes interacting with Java Content Repository (JCR) technology easier. The complete tutorial can be found on the eXo Resource Center – but here’s a sneak peak:

It’s been a year now since I started the CRaSH project. We use Java Content Repository (JCR) technology a lot at eXo, and I realized we all spent too much time and effort trying to interact with content repositories. We needed a tool to make this easier – so I decided to write a shell for JCR. While this new project, CRaSH, started as an interactive shell for browsing, querying and modifying JCR repositories, it has evolved into more than that.

The architecture of CRaSH is founded on two ideas:

  • The capability to serve multiple protocols: telnet and SSH are must-have’s
  • Extending the shell should be easy, and possible at runtime

CRaSH started very simply, so the first usable version took me only a few days to write. In this first version, I remember I used the Netty library to provide connectivity, as it had basic support for the telnet protocol (I didn’t need anything more at the time). I also selected Groovy language for writing shell commands, thinking it was the perfect match for two reasons. First, Groovy is dynamic and easy to compile, and second, you only need a little knowledge of Groovy to begin using it.

Since then, CRaSH has evolved to become richer and offer more capabilities. Netty was dropped because its telnet support was too basic; instead, Wimpi Telnetd and Apache SSHD were adopted to provide a real shell experience. CRaSH benefited from a couple of contributions as well (it’s always nice to have people in the open source community helping you), so it is pretty mature as of the recent 1.0.0-beta18 release (the only missing feature I would like is command line completion).

CRaSH is now a valuable tool to interact with a JVM runtime. The latest release provides two bundles. The first one, the core bundle, can be deployed in any servlet container. The second one is the GateIn bundle, which is built specifically for the GateIn portal server to add a powerful set of JCR features.

In this tutorial, we will focus on explaining basic CRaSH development, and demonstrate this by coding a command that will display a nice list of the JVM system properties.

Continue reading the “Introduction to CRaSH” tutorial on the eXo Resource Center…