IntroductionThis documentation accompanies Deliverable D2.2, Preliminary Prototype of the Cloud-TM platform. Its aim is to overview the current architecture of the prototype and to document how to set it up in order to develop applications running on top of it.As planned in the DoW this preliminary prototype does not include neither dynamic reconfiguration mechanisms, nor the Autonomic Manager which are going to be developed later on during the project. On the other hand, it contains already a preliminary version of some important building blocks of the Cloud-TM Data Platform, namely:
We remind to Deliverable D2.1 for a detailed description of the architecture of these components, but, for self-containment, we provide in the following a brief overview of their main functionalities. Note that, in order to simplify the development of the project’s pilot applications, the Cloud-TM’s Data Platform has been integrated with TorqueBox, a popular open-source framework for the development of web applications based on RubyOnRails 2 technology. In order to demonstrate the prototype, and verify the successful integration of the
different components of the Data Platform, we developed a simple demo, in the form a web
application. that allows testing three basic operations: i) definition of transactions; simple
retrieval of objects; create/read/update/delete (CRUD) operations. Relationship with other deliverablesThe Cloud-TM Preliminary Prototype, which this document accompanies and illustrates, has been developed on the basis of the Cloud-TM architecture described in deliverable “D2.1 Architecture Specification Draft”. As a consequence, the deliverable depends also on the user requirements gathered in deliverable “D1.1 User requirements report”, and takes into account the technologies identified in the deliverable “D1.2 Enabling technologies report”. Architectural Overview of the Cloud-TM Preliminary PrototypeThe high level architecture of Cloud-TM preliminary prototype is depicted in Figure 1. In the following we briefly overview the main modules composing the prototype, discussing what functionalities they currently support. An extensive description of the internal mechanisms that are already integrated in these modules, and of their planned developments, is provided in Deliverable D2.1.
Figure 1: Architecture of the Cloud-TM preliminary prototype TorqueBoxAs described in deliverable D6.1, “1st Periodic Management Report ”, it has been decided to develop the pilots as web applications using Ruby on Rails (RoR), a popular open source web framework that allows to write powerful applications in a very elegant and compact way. In particular, it has been agreed to use the JBoss implementation of RoR, namely TorqueBox, which allows for deploying applications developed using RoR into the JBoss J2EE Application Server.This required integrating TorqueBox programming model with the Cloud-TM’s Data Platform, and specifically with the APIs provided by the Cloud-TM’s Object Grid Mapper. In fact, RubyOnRails 2 (the version used by Algorithmica) already comes with its own domain modelling language, namely ActiveRecord, that relies on relational databases and is highly coupled to the framework. Nevertheless, shortly after the beginning of the project Rails 3 was released. This new version allows to replace the data model and provides a high level interface (ActiveModel) that allows to integrate into Rails different domain modelling languages. Thus, the work carried out up to date has allowed to use Rails 3 without ActiveRecord support allowing for a clean and easy integration with the Data Platform Programming APIs, and specifically with the Object Grid Mapper module, which is described in the following. Object Grid MapperThe Object Grid Data Mapper which is responsible for handling the mapping of object oriented data domain to the < key,value > pair data model, which is employed by the underlying Reconfigurable Distributed Software Transactional Memory. Currently, the prototype is equipped both with the Fénix Framework and Hibernate OGM. The former is able to specify, through a Domain Model Language (DML), the structure of an object-oriented domain model and to support transactions by relying on the Java Versioned Software Transactional Memory module. The latter is capable of storing data in a NoSQL data grid exploiting the pre-existent Hibernate Core, which exposes standard Java Persistence API.The internal architectures of these two modules are described in detail in Deliverable D2.2. In this document, therefore, we describe only how Fénix and OGM were integrated into TorqueBox. Another issue addressed is that, for both Fénix and OGM interfaces, it is required to access a Java API from Ruby code. TorqueBox is based on JRuby , a pure Java implementation of the Ruby language. For this reason, it is possible to write (J)Ruby code that transparently uses Java APIs. In the following we describe how this feature has been used to access the Data Platform Programming API, within the context of a TorqueBox application.
In “ lib/fenix_loader.rb”, we developed code that initializes the Fénix framework and that provides some shortcuts for accessing the Fénix public API that are then used at runtime to define transactions and manipulate the domain model. Currently, within TorqueBox, we can define transactions, navigate and perform CRUD operations on the Fénix domain model. Reconfigurable Distributed STM and Storage SystemIn the lower layers of the architecture lie the Reconfigurable Distributed Software Transactional Memory and the Reconfigurable Storage System.Both these functionalities are provided, in this prototype, by Infinispan (v. 5.0 Pagoa). Infinispan is a in-memory transactional data grid, which meets several of the base requirements of the CLOUD-TM platform and throughout the following phases of the project will be enriched with self-tuning and autonomic reconfiguration mechanisms. As described in the deliverable D2.1 Architecture Specification Draft, currently this version supports the following operational modes.
The availability of the above operational modes allows already for deploying, and preliminary testing, of applications both in private and public Clouds, also thanks to the availability of predefined configuration files supporting a wide range of deployment scenarios. The replication/distribution algorithms currently used at this stage are not adaptive, as adaptive, self-tuning functionalities will be developed in the following of the project. In addition to serve as the initial RDSTM of the Cloud-TM platform, Infinispan supports also the abstraction of Reconfigurable Storage System: by means of a modular plugin-based layer, in fact, Infinispan can persist/retrieve data from a range of heterogeneous stable storages, including local file-systems and cloud-oriented storages. Also in this case, adaptive behaviors are not yet available of course, and will be provided in the following of the project.Setting up the prototypeIn this section we describe the content of the package and the necessary steps to set upStructure and Content of the PackageThe content of the package is structured as followscloudTM_preliminary_prototype |_src |_RDSTM_and_RSS |_infinispan-4.2.2 |_infinispan-5.0.0CR4 |_object_grid_mapper |_Fenix |_Hibernate_OGM demo |_lib |_torquebox |_1.0.1 |_torquebox-dist-1.0.1-bin.zip |_2.x.incremental.95 |_torquebox-dist-2.x.incremental.95-bin.zip |_src |_fenix_demo |_ogm_demo doc |_D2.2-CompanionDocument.pdf
Installing and running the prototypeIn order to show how to setup the preliminary prototype of the Cloud-TM platform, and demonstrate its functioning, we have prepared a simple demo application that uses the two APIs currently provided by the OGM, namely Fénix Framework and Hibernate OGM.The demo application is a dummy rails application intended for experimenting on the integration of the Hibernate OGMframework with JRuby and TorqueBox . The application shows a web page with a draggable ball. When dragging the ball, the
client fires asynchronous Ajax requests to the server, that update position of the ball within a
transaction. As there are many asynchronous requests, conflicts are often generated (and
logged). Hibernate OGMThis application requires Torquebox 2.0 (http://torquebox.org) as Hibernate OGM has some dependencies with JBossAS 7. In order to run the application into a Jboss/Torquebox application server follow these steps:
Fénix FrameworkIn order to run the application into a Jboss/Torquebox application server follow these steps:
ConclusionsIn this document we have presented the Cloud-TM preliminary prototype of the RDSTMA and RSS components. The prototype is based on the integration of several components. At the core of the prototype we have Infinispan that represents a preliminary version of the RDSTM and of RSS, already implementing three operational modes but still with no support for adaptive and self-tuning features. On top of that, we have two interfaces of the Data Platform Programming API, namely a DML interface based on the Fénix Framework and a JPA interface based on Hibernate OGM. These components have been integrated in TorqueBox, a web application platform that will be used for the development of the pilot applications.Finally, we provided instructions on how to install and set-up the prototype, as well as on how to test it by means of a demo application Download The prototype can be download here: Preliminary Prototype Code (tar.bz2) |
Downloads >