Overview
This section explains the main concepts and elements of the GigaSpaces system environment, including space, space container, Processing Units, server startup scripts, properties and environment variables, and how to use them to set up the environment.
Deployment Architecture
Key Environment Elements
- Processing Units -
For more details, refer to the OpenSpaces Processing Unit section.
- Space (or cache)
- Space container
- Service container (or GSC)
- Cluster
The core element in the GigaSpaces architecture is the JavaSpaces space (the word cache is used to describe a space configured to act as a cache instance).
A space/cache always runs in a space container, a logical unit of the GigaSpaces server. The space container is encased in a service container: this enables dynamic deployment of spaces, and allows applications to access a space as a service (for more about the grid service container, see Service Grid).
Two or more spaces can form a cluster. The cluster comprises multiple spaces running in one or more containers. Two common clustering topologies are replicated and partitioned (see Space Cluster Topologies).
Remote vs. Embedded Space
Applications can access the space as a remote server. Direct communication with the space is facilitated by the RMI protocol or an NIO-based protocol; the space is discovered using the Jini Lookup Service or RMI. Alternatively, the space can be deployed as a service using the Service Grid.
The space can also run within the application's JVM. This type of space is called an embedded space.
Running the Remote Space
To run a space server:
Expand this...
Run gsInstance (<GigaSpaces Root>\bin\gsInstance.bat or .sh) – a script that launches a space container and one space within it, an embedded Reggie and an embedded Webster. An embedded Mahalo (Jini Transaction Manager) can be loaded – this option isn't enabled by default. For more details, refer to the gsInstance section.
This script uses the SpaceFinder or CacheFinder class to create a new instance. The same classes are used by applications to connect to an existing space.
Key Configuration Elements
The following configuration elements participate in the GigaSpaces runtime environment:
- Configuration schemas (<GigaSpaces Root>\config\schemas*-schema.xml or .xsl) – XML configuration files used as templates for the configuration of a space, container, or cluster.
- Space configuration schemas define the space instance configuration, including serialization mode, protocol, persistency model, and memory management.
- Container configuration schemas manage the lifecycle of the space and the lookup directory.
- Cluster configuration schemas define the space cluster topology. The topology is defined using three policies: replication, load balancing and failover.
- Default properties (com.gs.*) – variables used in the configuration schemas. The default properties hold the default values, which are not user-editable. These can be overwritten by user-defined values.
Flat Configuration Files Structure
Configuration files (libraries, properties files, schema files, JMS files, container.xml files, External Data Source/Hibernate files, POJO mapping files, etc.) can be organized in a flat structure – meaning under the <GigaSpaces Root> folder, or under their main folder without having sub-folders.
If you want to move certain libraries (jar files), you must edit the Class-Path entry in the <GigaSpaces Root>\lib\JSpaces.jar\MANIFEST.MF to match the desired structure. If you are using the GS_JARS variable that is set as part of the setenv shell, it also needs to be modified according to the new structure.
You do not need to update the MANIFEST.MF file and the GS_JARS variable when moving any other types of configuration files. |
Section Contents
- Common Environment Variables — Descriptions of the main environment variables set automatically by setenv.bat.
- Communication Protocol — Setting communication protocol using exporters; GenericExporter configuration – ports, connections, and threads.
- Configuration Files Element List — A list and description of Service Grid Deployment Descriptor, space schema, space container, cluster schema, JMS clustered space, JMS client schema configuration file, local cache, and space POJO class mapping schema elements.
- Debugging GigaSpaces Using Eclipse — How to create a new Java project for GigaSpaces in Eclipse, and debug it.
- Defining HTTP Codebase and Port — How to externally set HTTP codebase and port using -Djava.rmi.server.codebase.
- GigaSpaces Logging — GigaSpaces logging system.
- GigaSpaces Port Usage — Default ports used by the space, container, and Jini Lookup Service, and how to configure them.
- Installing GigaSpaces — Requirements and how to install GigaSpaces with Windows, Linux or Unix.
- Java SecurityPolicy File — Setting the java.security.policy property.
- License Key — Getting a license key and defining it in the space schema.
- Lookup Service Configuration — Defining group names and unicast Locators for Jini Services; searching for available lookup services in the network.
- Multicast Configuration — Enabling multicast on Linux and windows.
- Multi-NIC Configuration — Configuring GigaSpaces for a machine with multiple network cards. By default all network cards are used; you can limit GigaSpaces to specific ones.
- Network Failure Detection — The Network Detection Failure facility provides robust and optimize mechanism to identify network Failures.
- Overriding Default Configuration — Overwriting default configuration using a properties file or the Properties Java object.
- Performance Tuning — Helpful recommendations for tuning GigaSpaces, boosting its performance, and improving its scalability.
- Running Services - GSC and GSM — How to start a Grid Service Monitor and Grid Service Container, using the CLI or Admin UI.
- Setting Classpath — JARs that should be in the classpath of applications accessing a remote or embedded space.
- Setting JVM Location — Setting the JAVAHOME parameter to tell GigaSpaces where the JDK is installed.
- Space JMX Management — Controlling space attributes and operations using the JMX console.
- Space URL — An address, passed to SpaceFinder and CacheFinder, used to connect to a space and remotely create new spaces.
- System Properties List — List contains all system properties used by GigaSpaces, as defined in the com.j_spaces.kernel.SystemProperties class.
- Tested JVMs and Platforms — JVM vendors GigaSpaces has been tested with: Windows and Linux.
- Testing System Environment — Verifying a local installation, a remote installation, and cluster configuration.
- Troubleshooting Tools — Troubleshooting tools for testing a running product and environmental issues.
- Understanding Configuration Schema — What is a schema; space schema basics; overwriting default configuration; custom schemas.
- Custom Schemas — How to create a custom configuration schema, manually and using the GigaSpaces Browser.
- Overwriting Schema Settings in Runtime — Overwriting schema values using system properties and attributes in the space URL.
- Schema Basics — The space schema is defined through the schema attribute in the SpaceFinder URL.
- What is a Schema? — Uses of configuration schemas; physical location of schemas; schema naming conventions.
|