XAP

XAP is a distributed in-memory data grid that has high throughput and low latency due to storing all data in memory. As a result, there is no transaction delay between physical I/O so XAP can be applied to distributed applications ranging from financial services to retail. XAP has 3 tiers to its services: Open source, Premium, and Enterprise. The open source edition supports data partitioning, event processing, and distributed execution. It also supports full transactionality by maintaining full ACID compliance.

History

XAP is owned by GigaSpaces, which is an Israeli software company founded in 2000 by Nati Shalom. It was designed to be used to speed up performance or scalability of many existing database systems such as MySQL or MongoDB. XAP has many similarities to NoSQL with regards to the architecture such as using a scale-out model for scalability.

Checkpoints

Non-Blocking Blocking

There are two options when the redo log capacity is exceeded. The first is block-operations, where all cluster operations that need to be replicated are blocked until the redo log size decreases to below the maximum capacity. The second is drop-oldest, where the oldest packet in the redo log is dropped.

Indexes

R-Tree

XAP supports indexing over multiple properties. While indexing over multiple properties can improve read times, write times may slow down and take up more memory. XAP supports geospatial indexing implemented using an R-Tree as well as, nested property index, collection index, and dynamic indexing where indexes are dynamically added during runtime.

Logging

Physical Logging

All transactions are logged to a redo log. A primary node logs all the transactions into this log and if a backup node goes down, all the data gets replayed to a new backup that is created through a recovery process. Essentially, the redo log keeps all events that need to be replicated until the primary node re-establishes a connection with the backup. The redo log can be configured in from the max capacity to the buffer size that is being used to flush packets to disk.

Storage Architecture

In-Memory

Concurrency Control

Optimistic Concurrency Control (OCC)

XAP supports both optimistic concurrency control and pessimistic locking, however, OCC is the preferred strategy. With OCC, the idea is that you allow multiple users to read the same object, but only allow one user to update the object. XAP does this by maintaining a version number for each object. If multiple users try to update the same object at the same time, the ones that want to update a non-recent object will fail. This is better than pessimistic because locking may only be necessary in the worst case.

Data Model

Key/Value

The data model is implemented as a document store, where a document is a collection of key-value pairs. The keys are strings and the values can be String, Date, or other documents so they can be nested.

System Architecture

Shared-Nothing

XAP Logo
Website

https://xap.github.io/

Source Code

https://github.com/xap/xap

Tech Docs

https://docs.gigaspaces.com/

Developer

GigaSpaces

Country of Origin

US

Start Year

2000

Project Type

Commercial, Open Source

Written in

Java

Supported languages

Java

Licenses

Apache v2