Chrisrod's Weblog

agosto 7, 2009

A brief overview of EC2 and GigaSpaces

Filed under: GigaSpaces — chrisrod @ 1:21 pm

Elastic Compute Cloud

Elastic Compute Cloud (EC2) is an Amazon’s web service that provides resizable compute capacity in a cloud. One of the main characteristics of EC2, and at the same time one of its great advantage, is that it was designed to make web-scale computing easier for developers.

Amazon EC2’s simple web service interface allows to obtain and configure capacity with minimal friction. It provides as well a complete control of the computing resources and lets run on an Amazon’s computing environment.

Between the advantages that one can find using EC2, we could mention the reduction of time required to obtain and boot new server instances to minutes, allowing a quickly scale capacity, both up and down, as the change of computing requirements. Other advantages are the possibility to count with a diversity of Operating Systems, the possibility of run on multiple locations or utilize static IP endpoints.

To use EC2, it is necessary to sign up to the Amazon’s web page, and with this, get the two keys to use the web service; on of them is the Access Key ID, and the other one is the Secret Access Key, that can be generated as many times as one desire, depending on the security requirements that one has. With these two keys it is possible to access to all the web service’s facilities, depending on the type of account created.

To see EC2 in action, first it is needed to create an Amazon Machine Image (AMI) that will contain the application, libraries and the configuration settings. It is also possible to use one of the image templates to achieve the same objective, and one can do this using a firefox extension called “ElasticFox”, that can be download clicking on the next link:, once it is installed, you will see a GUI like the one is showed on the figure 01; once this extension is launched in firefox, it is possible to create the AMI, using the keys obtained on the Amazon web page, as it was explained on the previous paragraph. A really helpful tutorial to create a simple AMI can be found on the next link:, that explains how to create an Amazon account, the installation of the ElasticFox extension, and finally the creation and test of the new AMI. Once the AMI is created, the next step is to upload the web application to the Amazon Simple Storage Service (S3); between the tools used to accomplish this task, there is a firefox extension that can be smoothly installed on it, that is called “S3 Fox”, this extension can be downloaded clicking on the next link: Finally, it is possible to configure the security and network access, with the ElasticFox tool.

Figure 01. The ElasticFox extension

GigaSpaces XAP

GigaSpaces XAP (eXtreme Application Platform) is a scale-out application server. Among the advantages that one can find working with GigaSpaces, we can mention:




and these advantages give the possibility to use GigaSpaces to build the next generation class of applications.

It can be said that a usual Web-Application that stores its data within the IMDG (In-Memory Data Grid) would basically have the next machines:

GSM Machine

Load-Balancer Machine

Database and Mirror Machines

GSC Machines – Running Web Application, IMDG and Services

Figura 02. A basic Web Application running on a cloud.

As can be seen in the last figure, the whole cloud is composed for many machines that can be created very easily editing a XML file and uploading it, with the aid of the GigaSpaces Cloud Console that can be found at the GigaSpaces web page (, this console has many tools to create and manage all the clouds that one needs or have already been deployed. Comparing this tool, with the one that creates an Amazon’s AMI using the ElasticFirefox, this console is specially oriented to the creation and management of GigaSpaces clouds.

About the XML file that has to be edited for the creation of all the machines that one needs in a cloud, a basic template can be checked on the lines below this paragraph.











<!– Insert here –>




Between the “machine” tags one can create all the machines required for the Web Application; referring to the example of the figure 02, the XML file can be downloaded from the next link:

To upload this file, and by this way create the required machines, follow the next procedure:

01. Log into the Cloud Console using your GigaSpaces and Amazon Web Service (AWS) keys on this web page:

Figure 03. Log into the Cloud Console

02. Upload the XML file that has all the information of the machines to be used in the cloud, filling the “Deployment Descriptor” field and clicking in the button “Deploy

Figure 04. Deploying the machines with the Cloud Console.

Now to upload the Web Application to the Amazon’s S3, an easy way to do this task is using the “S3Fox” extension, following the next procedure:

01. Start the S3Fox extension signing up with the Amazon’s Access Keys.

Figure 05. Signing up to the S3 through the S3Fox

02. Create a test folder at the root level of the S3 account by clicking the button at the right side panel.

03. Upload all the necessary files from the left side of the panel to the right side that, by the way, corresponds to the S3.

Finally for testing the web application, observe the link next to the “Load_Balancer” field in the Cloud Console and click on it, the application that you upload on the S3 should be displayed on the web browser.

Figure 06. Checking the Web Application deployed in the S3.


After reviewing the documentation found in the internet about GigaSpaces, I think that is a technology very promising for the future developments of applications that will need to be reliable and at the same time very flexible.

Talking about the service given by Amazon EC2, I think that the price they offer to have a cloud deployed on its servers is very reasonable, knowing that taking care of a Data Center needs people specialized on its maintenance and management.

Blog de