Getting Started
This section contains guidance for getting started with GigaSpaces Service Grid A built-in orchestration tool which contains a set of Grid Service Containers (GSCs) managed by a Grid Service Manager. The containers host various deployments of Processing Units and data grids. Each container can be run on a separate physical machine. This orchestration is available for XAP only. (for XAP
GigaSpaces eXtreme Application Platform.
Provides a powerful solution for data processing, launching, and running digital services) and Kubernetes
An open-source container orchestration system for automating software deployment, scaling, and management of containerized applications. (XAP Skyline
A highly customizable developer platform that allows building scalable HA with high throughput and ultra-low latency Java applications running on Kubernetes clusters) environments.
Some useful terms: Stateful PU This is a Space containing data and might also include code and services. They are displayed in all UI tools and the metrics for them are managed., Stateless PU
Built-in services such as mirror WAN-GW, data GW and custom services. They are displayed in some UI tools (Ops-UI/Web-UI) but NOT in SpaceDeck. Metrics are managed., Client Services
Order | Action | Code Example | Reference/Explanation |
---|---|---|---|
1 | Create and connect to a Space![]() |
// an example of instantiating a remote proxy
|
The Space Bean |
2 | GigaSpaces Basic API - Write & Read | Client Blueprint | The Space Operations |
3 | Build your Data Model | @SpaceClass
public class Person {
private Integer id;
private String name;
private String lastName;
private int age;
...
public Person() {}
@SpaceId(autoGenerate=false)
@SpaceRouting
public Integer getId() { return id;}
public void setId(Integer id) { this.id = id; }
@SpaceIndex(type=SpaceIndexType.EQUAL)
public String getLastName() { return lastName; }
public void setLastName(String lastName) { this.lastName = lastName; }
@SpaceProperty(nullValue="-1")
public int getAge(){ return age; }
.......
}
|
Modeling Your Data |
4 | Understanding Routing![]() |
Routing is the property inside a space class that says how objects will be distributed across partitions, there is also a strategy that instead of distributing you can replicate the table data across all partitions for small tables.
|
|
5 | Add Colocated Logic to your Space |
Colocated logic can contain event processing, code for services, and any application bean that should run together within the Space partition, in the example provided, you can see colocated event containers and remote service exposure
In your installation folder you will find examples of event processing:
|
|
6 | Query your data | results = gigaSpace.readMultiple(new SQLQuery<MyClass>(MyClass.class, "num > 1 ORDER BY name"));
|
Query Language |
7 | Change your Data Efficiently |
|
Change API Overview |
8 | Send Code to be Executed on Data JVMs |
AsyncFuture<Long> future = gigaSpace.execute(new MyDistTask()); long result = future.get(); // result will be number of partitions
|
Task Execution Overview |
9 | Build Workflows |
With event processing you can build workflows, moving related object from one state to the other and define listeners per state
|
|
10 | Interact with the Database |
You can perform an initial load into the Space from a data source and can replicate changes in memory to a target (database, Kafka
|
Persistency for a Database |
11 | Creating a PU![]() |
||
12a |
Deploy your Services in Service Grid XAP only |
Deploying onto the Service Grid | |
12b |
Deploy your Services in Kubernetes XAP Skyline only |
Deploying a Customer Processing Unit helm install custom-pu gigaspaces/xap-pu --version 16.5.0 --set instances=0,partitions=1,resourceUrl=pu.jar,image.repository=my-space,image.tag=latest
|
|
Training Materials
The following training materials can be accessed in order to assist in getting started:
-
GigaSpaces Kubernetes - XAP Skyline and Smart DIH
Smart DIH allows enterprises to develop and deploy digital services in an agile manner, without disturbing core business applications. This is achieved by creating an event-driven, highly performing, efficient and available replica of the data from multiple systems and applications, only.
Examples
Integration examples such as Spring data, how to use Grafana Grafana is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources., monitoring with Kubernetes, installing on OpenShift, deep learning, and more can be found in our Git Solution Hub. You can also find a best practice section with examples for WAN gateway replication, Data modeling patterns, Custom aggregation examples, and much more.
Need assistance or further information? Don't hesitate to contact us — we're here to help!