XAP

Part 1, Setting the Environment

This is the first part of a four-part hands/on introduction to GigaSpaces XAP. It is designed to give you a quick, easy understanding of the GigaSpaces system.

What is GigaSpaces XAP?

XAP is a high-performance, highly configurable caching mechanism that speeds up your application processing. Data is brought into the GigaSpaces in-memory grid, where it can be accessed at extreme speed.

This introduction consists of four parts:

  • 4 Part 1 — Setting the Environment (this topic) — Prepare a database that will be imported into GigaSpaces. In these examples, we will use data from the PostgreSQL database.

  • Part 2 — Launch Ops Manager — Run and view the GigaSpaces user interface.

  • Part 3 — Import a Database — Bring data from the PostgreSQL database into XAP, the GigaSpaces in-memory grid, and run some SQL operations.

  • Part 4 — Convert a Program — Explore the tools to convert a Java program from JDBC access to the GigaSpaces Java API.

Need assistance or further information? Don't hesitate to contact us — we're here to help!

What Will We Do in This Topic?

We will download and install GigaSpaces and PostgreSQL, the database we are using in these examples. We will then create a sample PostgreSQL database.

Later, in Part 2 of this introduction, we will launch Ops Manager, the GigaSpaces user interface.

Prerequisites

These examples run on a Unix or Windows machine with the following capabilities:

  • 3 GB RAM

  • 4 GB disk

  • Java 8 or 11

  • Scala 2.11

  • Maven 3.1+

Downloads

  • Download GigaSpaces XAP. Use the default version, which is the latest version of the product.

  • Extract the zip file into a location on your PC.

  • In the home directory, enter a license key of tryme in the gs-license.txt file:

  • The trial license is valid for 24 hours.

  • Download and install PostgreSQL on your PC. Be sure to include the pgAdmin component of PostgreSQL.

Create a PostgreSQL Database with Some Sample Data

Using the pgAdmin tool, under the default database of postgres, create the Persons table and run the following commands to create 1,000 similar records. We will use these records later in SQL queries.


drop table Persons;
CREATE TABLE Persons
   (personId int  PRIMARY KEY,
    personName  char(30),
    personCountry char(30));
delete from Persons;
do $$
    begin
        for r in 1..1000 loop
            insert into Persons (personId , personName, personCountry) 
            VALUES (r ,concat('Person ', r), concat('Country ',r));
        end loop;
    end;
$$;
select * from Persons limit(10);
 

The table schema looks like this:

The table data appears as follows:

What's Next?

In Launch Ops Manager, we will launch Ops Manager, the GigaSpaces user interface, and take a brief tour of its features.

Need assistance or further information? Don't hesitate to contact us — we're here to help!