InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

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

Posted by Gilad Manor on Mar 20, 2010

Sections
Operations & Infrastructure,
Enterprise Architecture,
Development,
Architecture & Design
Topics
Grid Computing ,
Performance & Scalability ,
Java ,
Clustering & Caching
Tags
GigaSpaces ,
Spring

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.

No comments

Watch Thread Reply

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.