XAP Technical Overview

GigaSpaces XAP – Technical Overview

GigaSpaces eXtreme Application Platform (XAP) is a next-generation application server that works seamlessly with existing development frameworks in Java (Spring, Hibernate, Tomcat, Mule, J2EE), .Net and C++.

The following is an in-depth technical description of GigaSpaces XAP. For a high-level description, please visit the GigaSpaces XAP product page.


 

silos to XAP

The diagram above compares a tier-based application with GigaSpaces XAP.

With existing tier-based architectures each tier (messaging, business logic, data) is a silo, physically residing on a centralized server, with its own high availability and scalability model. With GigaSpaces XAP, on the other hand, the tiers are virtualized, meaning they appear as a centralized server to the application using them, but the underlying implementation is distributed on a cluster of servers. The cluster handles scalability and high-availability for all of the tiers as a single unit. Scaling with GigaSpaces is, therefore, a simple matter of adding another server, with no code or configuration changes. If a node in the cluster fails, another one instantly takes over.

GigaSpaces XAP: Built for Scale-Out and Cloud Environments

  • Middleware Virtualization: GigaSpaces extends the notion of virtualization -- commonly used at the OS level -- to middleware. Unlike traditional middleware, GigaSpaces was designed from the ground-up to operate in a "cloud", because it addresses all aspects of application distribution: messaging, data, business logic and deployment. This is achieved while making the application look and behave as if it is running on a single server (see additional details below)
  • Self-Healing: Failure of a node in the system -- for example, due to memory shortage -- will result in the automatic re-location of the relevant service or component to an alternate machine
  • SLA-Driven: Application deployment is mapped to appropriate resources based on service-level agreements (SLAs). SLAs definitions may include required system resources, such as CPU, Memory, Operating System type, JVM version and so on
  • Multi-Tenancy: Multiple applications can share the same containers and environment. The system is capable of independently managing each application's life-cycle and SLAs. Applications are isolated from one another, even in cases in which they run on a shared process environment.
  • Service-Oriented: The development model is designed for building loosely-coupled service architectures

Middleware Virtualization:

GigaSpaces XAP enables middleware virtualization, which is similar in concept to storage virtualization. Storage virtualization enables transparently switching a local disk with a network device, thus gaining the benefit of scale without changing application code. With middleware virtualization this is achieved by replacing traditionally centralized messaging, data, and service implementations with a virtual one. The GigaSpaces XAP virtual middleware stack enables existing applications to seamlessly scale with high-performance. This is achieved by re-implementing core APIs (e.g., JMS, HashMap/JCache, JDBC, Remoting) and through comprehensive abstraction, which enables tight integration with popular development frameworks, such as Spring, Mule, .Net and C++. Application code utilizes familiar APIs and frameworks, but gains the benefit of performance and scalability by leveraging the GigaSpaces virtual implementation of the APIs.

Shared Virtualization/Clustering Layer

GigaSpaces XAP provides all supported APIs, languages and logical tiers with a shared cluster for transaction semantics, distributed state management, reliability and scalability. This is a key differences between the GigaSpaces run-time platform and those of typical application servers. It significantly reduces the complexity of building and maintaining distributed applications. Unlike existing tier-based applications, there is no need to maintain separate clusters for the JMS tier, the database and the application server. It reduces complexity created by the silo approach, in which each tier has to independently maintain high-availability. It also reduces latency, as we decrease the number of network hops between the tiers, which are now physically collocated. By reducing the number of moving parts, a major source of application failure, application reliability increases significantly.

Development Framework

The GigaSpaces XAP development framework is built in layers, which scale across a cloud of machines and guarantee continuous high-availability -- purely in memory.

  • Data Virtualization: In-Memory Data Grid (IMDG)

The in-memory data grid (also known as distributed caching) is the layer responsible for mapping multiple data partitions and their replicas to appear as a single data source to the application. It also enables seamless integration with relational databases and other persistent data stores.

  • Messaging Virtualization

This layer is responsible for mapping multiple partitions and their replicas to appear as a single queue and/or topic to the application.

  • Service Virtualization (Business Logic Layer)

This layer is responsible for making multiple service instances appear as one to the application (this layer is an evolution of the Session Bean in JEE, RMI, CORBA or DCOM).

OpenSpaces Java Development Framework

OpenSpaces is GigaSpaces XAP's core Java development framework, provided with the product as open source. OpenSpaces simplifies the development and deployment of distributed applications on top of the GigaSpaces XAP run-time platform. It was also designed to abstract application code from the actual run-time implementation, thus avoiding tight coupling and vendor lock-in. This abstraction includes event processing, as well as messaging and remoting. It also supports declarative transactions and distributed data management.

OpenSpaces supports several of the popular Java development frameworks, such as Spring, Mule and Hibernate. This integration enables seamless high availability and scalability for applications written in using these frameworks. Using OpenSpaces, for example, Spring applications can seamlessly plug-in GigaSpaces XAP's remoting, messaging and data components to achieve high availability and scalability. Similarly, Mule ESB users can seamlessly add high-availability and reliability to existing mule applications. GigaSpaces and others are constantly adding support for additional frameworks and platforms. An interesting example is the GigaSpaces XAP support provided to Lucene and Compass, which enables users of these OSS products to run their search index on top of the GigaSpaces XAP run-time.

.Net Development Framework

GigaSpaces XAP support for the .Net framework is extensive and provides similar capabilities to those provided in Java for enabling distributed data management, caching, messaging and scalability. It integrates with existing Microsoft products such as Excel and IIS. It also integrates with nHibernate to enable seamless integration with existing databases.

C++ Development Framework

The C++ framework provides a native API for C++ users and supports major operating systems and compilers. Like the Java and .Net platforms, it provides the ability to maintain distributed state management of C++ objects, as well as provide messaging support for enabling notification of events, queues and topics, including transaction support, batch notifications and of course all of the clustering capabilities. One of the unique capabilities of GigaSpaces XAP is the ability to run embedded C++ services. Embedded C++ services can be deployed in the common SLA-Driven Container and can be deployed dynamically across a pool of machines. In this mode, C++ services leverage the fact that they are collocated with the data.

Built-In Interoperability

Unlike J2EE application servers, which are Java-centric, GigaSpaces XAP provides native interoperability among its supported languages -- Java, .Net and C++ -- and supported APIs.

  • Language Interoperability

To enable high-performance interoperability, each language in GigaSpaces XAP uses a portable binary serialization (PBS) format that enables applications written in these languages to interact with each other during run-time, while maintaining a native development environment. Unlike other frameworks, it allows services written in Java, .Net and/or C++ to run within the same process, avoiding unnecessary network calls.

  • API InteroperabilityInteroperability

With GigaSpaces XAP all APIs share the same run-time platform (see below for more details). One of the benefits of this is API interoperability. For example, a message written with a JMS API can be queried with a JDBC API or consumed as a pure POJO. It can also be updated directly. This eliminates unnecessary transformations and enables consistent behavior among all APIs.

  • Data Interoperability

GigaSpaces XAP seamlessly integrates with existing databases through its built-in Hibernate plug-in. This means that all updates on the GigaSpaces data grid are kept in-sync with the database as if they written directly to it by the application. Consequently, other legacy applications, such as reporting systems, can continue operating against the database.

Deployment Virtualization

Deployment virtualization enables automation of the deployment process, allowing distributed applications to deploy on the cloud as a single server. It is comprised of several components:

Grid Service Container (GSC): The GSC is a lightweight SLA-driven container. Essentially, it is a process that hosts the application and manages its life cycle. It is also responsible for exposing a given compute resource's capabilities to the Grid Service Manager.

Grid Service Manager (GSM): The GSM is responsible for managing the GSCs and for mapping a deployment request to the appropriate GSC.

Deployment Descriptor: This is where required SLAs are specified. SLAs can include the desired topology (e.g., partitioned/replicated), cluster size, failure-handling semantics, relocation policy and more.

Additional Resources

  • To learn more about GigaSpaces Data Grid, the supported topologies and data base integration refer to the EDG overview
  • Get started with GigaSpaces XAP with this tutorial