BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

GigaSpaces XAP 7.1 EA: Elastic Middleware, Data Querying and Spring 3.x

by Gilad Manor on Mar 20, 2010 |

GigaSpaces XAP is a distributed application server with an in-memory data grid. GigaSpaces started off as a commercial, clustered JavaSpaces implementation, then expanded to include in memory data grid capabilities such as local caching, eviction and query support. Further down the line, GigaSpaces introduced Space based architecture as a broader solution for scalability and low latency of enterprise applications. In the core of the space based architecture lays an extended, lightweight Spring container that packages middleware functionality such as data storage and messaging. This container is then duplicated on other machines in the grid, providing linear scalability. In recent versions, the focus has been on the simplification of the user experience and management of distributed applications.

The XAP 7.1 release includes a number of themes:

The Elastic Middleware Service

A new elastic middleware service delivers Amazon EC2-compatible middleware services, aimed at simplifying deployment and usage. The first milestone with this theme includes the elastic data grid capability.

The old, low level configuration (i.e. host bindings, IP addresses and the number of data grid partitions) is replaced with some high lever details and the definition of the initial and maximum capacity of the data grid. With the new elastic middleware service, the system identifies the hardware resources that are available or provisions the required resources (in case of a virtualized environment) and starts the data grid with a preset configuration. The API would look like the following:

elasticServiceManager.deploy(new ElasticDataGridDeployment("mygrid")
                                        .isolationLevel(IsolationLevel.DEDICATED)
                                        .highlyAvailable(true)
                                        .elasticity("2GB", "6GB")
                                        .jvmSize("512MB")
                                        .addSla(new MemorySla(70)));

The automated configuration makes scalability and fault tolerance transparent. This is managed with load balancing between nodes, the system reinstating failed data grid partitions on available machines and by moves data between the deployed machines when a certain memory threshold is exceeded.

Virtualization Compatibility

The new release has been tested and made compatible with several virtualization platforms such as VMWare, GoGrid and RackSpace. In the near future, it is also planned to add Terremark and Citrix Xen integrations.

Data Querying

Some improvements were made in the data grid querying capabilities, now supporting queries on fields of nested objects using path expressions:

SQLQuery query = new SQLQuery(Person.class, "address.street.number = 1");

Indexing for space querying is controlled from the parent class using a new set of annotations:

@SpaceClass
public class Person
{
    private String lastName;
    private String firstName;
    private Integer age;

    ...
    @SpaceIndex(type=IndexType.BASIC)
    public String getFirstName() {return firstName;}
    public void setFirstName(String firstName) {this.firstName = firstName;}

    @SpaceIndex(type=IndexType.BASIC)
    public String getLastName() {return lastName;}
    public void setLastName(String name) {this.lastName = name;}

    @SpaceIndex(type=IndexType.EXTENDED)
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
}

Management Application

A new web interface for the management tool is introduced in this version, a GWT/AJAX based dashboard that will present a real time aggregation view of the entire cluster and its runtime components, providing both graphical and tabular views (figure 1). The existing administration GUI, which was introduced in the previous 7.0 version, has been augmented with capabilities for thread snapshot and log tails that aggregate all registered JVMs. The thread dump capability is available via API as well.

Figure 1: the web management dashboard

Embedding Spring 3.0

The XAP 7.1 server now embeds Spring 3.0, and supports backward compatibility to the earlier Spring 2.5 version. However, it's recommended to recompile the application with the new Spring 3 distribution prior to deployment.

Performance Improvements

Some improvements in performance were made for this version includes:

  • The mechanism for concurrent index scans has been rewritten to be as contention-free as possible
  • Enabling multi thread, concurrent processing of SQL queries in case of complex queries
  • Transaction processing time has been improved by change in data structure and newer synchronization constructs (i.e. java.util.concurrent package)

Steps For Scaling Out

In order to make use of the XAP 7.1 framework for an existing application, there is a gradual path that depends on the area of problems the application needs to tackle. The steps are defined as following:

  • Web tier: Deploying a standard WAR file using XAP, for dynamic load-balancing
  • Messaging/events: Replace existing Message Driven Beans with XAP event listeners, for messaging
  • Remoting: By adding annotations on POJOs or by using Spring XML configuration, integrate with remote invocations and async remoting
  • Data access (Basic): The first level for integrating GigaSpaces XAP is as a 2nd-level cache for Hibernate. This aims to provide a significant performance boost in read-mostly scenarios
  • Data access (Advanced): By partitioning the data model structure and converting DAOs to access directly the XAP In-Memory Data Grid, read and write performance is improved
  • Transactions: No migration needed for Spring-based applications. For other applications, it is recommended to use the Spring transaction framework

The XAP 7.1 early release is now available with documentation and downloads.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT