Part 1, Setting the Environment

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

What is GigaSpaces Smart Cache?

Smart Cache 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:

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 Smart Cache. 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!