We are now open!

Why GigaSpaces XAP Open Source?

Check out some of features that we have opened up to the community. To learn more about XAP features, continue reading our documentation and check out the XAP code examples.

  • Data Partitioning

    Scale your data tier by partitioning or replicating across an in-memory data grid.

  • Event Processing

    Implement event-driven architecture workloads at microsecond latencies.

  • Rich Query Language

    Apply SQL query semantics against POJOs, Documents, and GeoSpatial data.

  • Full Transactionality

    Maintain full ACID compliance against your data set through full transaction semantics.

  • Distributed Execution

    Leverage in-memory Map/Reduce patterns as well as ultra-low latency remoting for high-throughput processing.

  • Persistence

    Persist your data using highly-avaialble asynchronous write behind patterns to relational and NoSQL data stores.

Become a XAP hero

Your First XAP Application

You need somewhere to start. Check out the code below to build your first data grid.


				package org.gigaspaces.xap.demo;

import org.openspaces.core.GigaSpace;
import org.openspaces.core.GigaSpaceConfigurer;
import org.openspaces.core.space.SpaceProxyConfigurer;

public class Program {

    public static void main(String[] args) {
        System.out.println("Connecting to data grid");
        SpaceProxyConfigurer configurer = new SpaceProxyConfigurer("myGrid");
        GigaSpace gigaSpace = new GigaSpaceConfigurer(configurer).create();
    }
}

				

public class MyDistTask implements DistributedTask {

  public Integer execute() throws Exception {
    return 1;
  }

  public Long reduce(List> results) throws Exception {
    long sum = 0;
    for (AsyncResult result : results) {
      if (result.getException() != null) {
        throw result.getException();
      }
      sum += result.getResult();
    }
    return sum;
  }
}
				
Distributed Tasks

XAP supports Task execution in an asynchronous manner, collocated with the Space. Tasks can be executed directly on a specific cluster member using routing declarations. Tasks can also be executed in “broadcast” mode on all the primary cluster members concurrently and reduced to a single result on the client-side.

Continue reading...

@EventDriven @Polling
public class SimpleListener {

	@EventTemplate
	Data unprocessedData() {
			Data template = new Data();
			template.setProcessed(false);
			return template;
	}

	@SpaceDataEvent
	public Data eventListener(Data event) {
		//process Data here
	}
}
				
Event Containers

The polling event container is an implementation of the polling consumer pattern which uses the space to receive events. It performs polling receive operations against the space. A polling event operation is mainly used when simulating Queue semantics or when using the master-worker design pattern.

Continue reading...

public class MySpaceSynchronizationEndpoint extends SpaceSynchronizationEndpoint {
    @Override
    public void onOperationsBatchSynchronization(OperationsBatchData batchData) {
        // Get operations in batch
        DataSyncOperation[] operations = batchData.getBatchDataItems();
        for (DataSyncOperation operation : operations) {
            switch (operation.getDataSyncOperationType()) {
                case WRITE:
                    // INSERT to SQL
                    break;
                case UPDATE:
                    // UPDATE to SQL
                    break;
                default:
                    System.out.println(operation.getDataSyncOperationType() + " operation");
            }

        }
    }
}								
Async Persistency

The Space Persistency is made of two components, A space data source and a space synchronization endpoint. These components provide advanced persistency capabilities for the space architecture to interact with a persistency layer.

Continue reading...
Unboxing

What's included

Checkout the files that you'll see upon downloading

Once you download the Open Source edition, you can see a folder with several files and sub folders. Check out the tree below to see which files are relevant for you.

  • gigaspaces-xap-open-12.0.0-ga
    • bin
      • space-instance.shStarts an instance of a Space
      • pu-instance.shStarts an instance of a XAP Processing Unit
    • configHere is a place where you can set cluster-wide configuration settings.
    • deploy
    • examples
      • hello-worldExplore the Space data modeling and read/write API
      • hola-mundoImplement a processing unit with space-based architecture patterns
    • libThis is where the core XAP data grid runtime engine lives.
    • logs
    • policy
Get your hands dirty

Community

Please reach out if you'd like to get involved in the XAP community