 | Summary: How to upgrade GigaSpaces from version 5.2 to 6.0.
|
Overview
Backwards Compatibility in GigaSpaces 6.0
GigaSpaces 6.0 is a major milestone release, which provides very rich content and enhanced functionality and performance, as well as an enhanced programming model, and enhanced deployment.
We have tried to maintain backwards compatibility when possible, however, in some cases, no backwards compatibility is provided.
As a best practice, when upgrading from GigaSpaces 5.2 to GigaSpaces 6.0, unzip the latest version of GigaSpaces 6.0, and port the necessary changes from your 5.2 environment into your new 6.0 environment.
There is no utility which upgrades from GigaSpaces version 5.2 to 6.0. It is recommended to use the GigaSpaces 6.0 distribution as-is.
In some scenarios, when there is a need to use the existing 5.2 environment, you are required to perform a set of steps in order to manually upgrade the system to version 6.0. These steps are detailed in the sections below.
GigaSpaces version 5.2 is currently supported, but will become deprecated in the future.
Mixing GigaSpaces versions
We do support:
Applications that were built using 6.0 will run without any code changes on a clean 6.0.x installation.
We do not support:
Mixing clients/servers from different GigaSpaces releases/builds - Clients of 6.0 will not run against 6.0.x servers. 6.0.x clients will not run against 6.0 servers. 6.0.x servers will not communicate well with 6.0 servers.
Mixing JDK Environments and GigaSpaces JARs
GigaSpaces running with JDK 1.5/1.6 can run with GigaSpaces 1.4 JARs, but GigaSpaces running with JDK 1.4 can't run with GigaSpaces 1.5/1.6 JARs:
If you have GigaSpaces running with JDK 1.4 and another installation of GigaSpaces running with JDK 1.5/1.6, use the GigaSpaces JAR files from the earliest version – copy the JSpaces.jar and JSpaces-ui.jar files from the <GigaSpaces Root>\lib directory of your GigaSpaces 1.4 installation to the <GigaSpaces Root>\lib directory of your GigaSpaces 1.5/1.6 installation.
GigaSpaces .NET does not support JDK 1.4.
GigaSpaces components (space, cluster of spaces, Processing Unit, GSM, GSC, LUS, Mahalo, GUI, CLI) can run only with the same GigaSpaces JARs (i.e., the same version and same build number).
Migrating to Open Spaces
See the Migrating to Open Spaces section.
Service Grid Changes
Deployment Descriptor Change
When migrating a GigaSpaces 5.2 application using the Service Grid Deployment Descriptor, update the SLA component to version 6.*:
Change:
<ServiceLevelAgreements>
<SystemRequirements>
<Utilization High=".9" ID="System" />
<Utilization High=".9" ID="CPU" />
<Utilization High=".9" ID="Memory" />
<SystemComponent Name="GigaSpacesSupport">
<Attribute Name="Version" Value="6.*" />
</SystemComponent>
</SystemRequirements>
</ServiceLevelAgreements>
to:
<ServiceLevelAgreements>
<SystemRequirements>
<Utilization High=".9" ID="System" />
<Utilization High=".9" ID="CPU" />
<Utilization High=".9" ID="Memory" />
<SystemComponent Name="GigaSpacesSupport">
<Attribute Name="Version" Value="5*" />
</SystemComponent>
</SystemRequirements>
</ServiceLevelAgreements>
Moving from Service Grid to Open Spaces
- Deployment Descriptor – Moved to pu.xml
- New Simplified SLA Definition Using pu.xml
- IWorker and Service Beans (Deprecated) – Moved to POJO services Within the Processing Unit
External Data Source (CacheLoader\CacheStore)
We recommend that you use the External Data Source interface in GigaSpaces XAP 6.0. However, performing read-through and write-through as in version 5.2 is also supported in version 6.0 (deprecated). For more details, see the version 5.2 documentation.
To use the External Data Source interface, define the following in your persistent space schema:
<space-config>
<persistent>
<enabled>true</enabled>
<StorageAdapterClass>com.j_spaces.sadapter
.datasource.DataAdapter</StorageAdapterClass>
</persistent>
</space-config>
or add the following properties to your <GigaSpaces Root>\config\gs.properties file:
| Change |
5.2 Usage |
6.0 Usage |
| New External Data Source replaces CacheLoader/CacheStore |
CacheLoader/CacheStore were used, both for Map API and JavaSpaces API. |
- Map API - still uses CacheLoader/CacheStore.
- JavaSpaces API - uses new External Data Source interface.
|
| CacheLifeCycleManager replacement |
CacheLifeCycleManager was used. |
Replaced by the ManagedDataSource - the init() method doesn't return any properties like the CacheLifeCycleManager, these properties are defined in the configuration, and are accessible to the CacheManager. |
| CacheLoader replacement |
CacheLoader was used. |
Replaced by the DataProvider. Currently read() is called only for queries with a UID, imposed by the transaction locking. There is no loadAll() method, since it is not needed by the space (the space always prefers the iterator). |
| CacheStore replacement |
CacheStore was used. |
Replaced by the DataPersister. This interface provides basic persistency of single objects. The objects passed to this interface are user defined objects. |
| CacheBulk replacement |
CacheBulk was used. |
Replaced by the BulkDataPersister. This interface provides bulk support - used by the mirror and transactions.
If you were using the Mirror Service in version 5.2, and would like to use the enhanced mirror data replication in 6.0, you need to re-implement this interface. |
| BulkEntry replacement |
BulkEntry was used. |
Replaced by BulkItem.
If you were using the Mirror Service in version 5.2, and would like to use the enhanced mirror data replication in 6.0, you need to re-implement this interface. |
| CacheIteratorFactory replacemement |
CacheIteratorFactory was used. |
Replaced by SQLDataProvider. This interface provides quering abilities for the data source. The query object is the SQLQuery object - replaces the CacheQuery object. |
| CacheIterator replacement |
CacheIterator |
Replaced by DataIterator - an extension of the java.util.Iterator adds a close() method that allows you to free any resources referenced by the iterator. |
| Configuration modification |
Configuration was defined in the persistent space schema. |
Data source configuration is defined in a new <external-data-source> block. |
| <CacheLoaderClass>, <entity-class>, <username>, <password> – deprecated |
Used for CacheLoader/CacheStore configuration. For the elements' description, see the version 5.2 documentation. |
These tags are relevant only if you are performing read-through and write-through as in version 5.2 (see the tip above). These have been removed from the schemas as of GigaSpaces 6.0.1. |
Large Scale Deployment Recommendations
Click here for instructions and best practices when tuning large-scale deployments.
Event Session – Registering for Notifications
Registering for notifications as in version 5.2 (NotifyDelegator, NotifyDelegatorMultiplexer, MulticastNotifyDelegator) is deprecated in GigaSpaces 6.0. These interfaces are backwards compatible and can still be used in version 6.0.
However, we recommend that you use the new Session Based API.
To do this, the following changes should be taken into consideration:
| Change |
5.2 Usage |
6.0 Usage |
| Registering one template for notification |
new NotifyDelegetor(...) |
- Get EventSessionFactory,
- create EventSessionConfig,
- setComType in the configuration to UNICAST,
- add the listener.
|
| Register more then one template for notifications |
create NotifyDelegetorMultiplexer and notify |
- Get EventSessionFactory,
- create EventSessionConfig,
- setComType in the configuration to MULTIPLEX,
- add the listener.
|
| Register template in Multicast |
create MulticastNotifyDelegator and notify |
- Get EventSessionFactory,
- create EventSessionConfig,
- setComType in the configuration to MULTICAST,
- add the listener.
|
| Stopping the notification. |
Closing the delegator. |
Remove the listener. |
| Renew the Lease of the template. |
LeaseRenewalManager |
Set autoRenew in the configuration. |
| Batch notifications. |
Not supported |
Set batch in the configuration. |
| Replicate the template to backup spaces. |
This was done using the space schema. |
This is done by setting replicate in the configuration with a default from the schema. |
| Get notifications from backup spaces. |
This was done using the space schema. |
This is done by setting trigger in the configuration with the default from the schema. |
GigaSpaces-Service Grid Consolidation
The Service Grid and GigaSpaces have been integrated into one coherent product. This includes several critical changes:
One config Directory
| Change |
5.2 Usage |
6.0 Usage |
| Service Grid configuration files location |
All Service Grid configuration files were located under \ServiceGrid\config. |
All configuration files reside in the \config directory (including the Service Grid configuration files). |
- <GigaSpaces Root>
\config\overrides
\sg-platform.xml
- <GigaSpaces Root>
\config\overrides
\spring-platform.xml
- <GigaSpaces Root>
\config\services
\services.config
- <GigaSpaces Root>
\config\services
\start-mahalo.config
- <GigaSpaces Root>
\config\services
\start-reggie.config
- Removed \config\services\gigaspaces.config
and \config\services\start-gigaspaces.config files.
|
These files contained redundant environment variables. |
These files have been modified and cleaned from redundant environment variables (see which variables were removed below). |
| Deployment Descriptor Codebase element |
|
You can still use:
This also means that the Adaptive value is now no by default. |
One CLI and One bin Directory
| Change |
5.2 Usage |
6.0 Usage |
| Service Grid CLI commands and shells location |
Service Grid CLI commands and shells were located under <GigaSpaces Root>\ServiceGrid\bin. |
All CLI commands are located under <GigaSpaces Root>\bin. |
| gsServer removal |
gsServer |
gsInstance is used instead – loading an embedded Mahalo is now possible as part of this command. |
| cleanSpace removal |
cleanSpace |
gs> space clean is used instead. More details |
| destroySpace removal |
destroySpace |
gs> space destroy is used instead. More details |
| createSpace removal |
createSpace |
gs> space create is used instead. More details |
| gs_ant removal |
gs_ant |
Was redundant. No usage. |
| js_java removal |
js_java |
Was redundant. No usage. |
| list removal |
list |
gs> space list is used instead. More details |
| multicastTest removal |
multicastTest |
admin multicasTest is used instead. More details |
| ping removal |
ping |
gs> space ping is used instead. More details |
| PlatformVersion removal |
PlatformVersion |
PlatformInfo is used instead. More details |
| shutdown removal |
shutdown |
gs> space shutdownContainer is used instead. More details |
| startSpace, stopSpace removal |
startSpace, stopSpace |
gs> space start, gs> space stop are used instead. |
| userAdministrator removal |
userAdministrator |
admin userAdmin is used instead. More details |
| Service Grid shell files call \bin\setenv |
|
All Service Grid shell files call \bin\setenv. You do not need to check about JAVA_HOME, JAVA_CMD, etc, since this is already taken care of in setenv. |
| All the service grid shell files end with .bat and .sh |
Windows shell files ended with .cmd and Unix shells had no ending (for example, gsc). |
Windows shell files end with .bat and Unix shells end with
.sh – consistent with the whole product. |
One Logging Infrastructure
| Change |
5.2 Usage |
6.0 Usage |
| Logging infrastructure |
The ServiceGrid logging configuring through the Deployment Descriptor. |
New logging infrastructure based on the GigaSpaces java.logging only. More details |
| One logs directory and configuration |
The ServiceGrid logs used to be stored at \ServiceGrid\logs directory |
One logs directory at \logs and configuration file at \config\gs_logging.properties. |
| gs-ui.log and gs.log removal |
\ServiceGrid\gs-ui.log and \ServiceGrid\gs.log |
All components: UI, Service Grid, space and Jini services now use same Java logging configuration facility \config\gs_logging.properties. |
| Each Service Grid service process has a separate java.logging based log file, where its prefix is the services name. |
All Service Grid logs went to gs.log. |
Each Service Grid service process has a separate java.logging based log file, where its prefix is the services name. For example: Running gsc.bat creates gigaspaces_gsc_1.log, running gsm.bat creates gigaspaces_lh_gsm_1.log, running a plain space (gsInstance) creates gigaspaces_1.log, etc. When you deploy a space in the Service Grid, its output is logged into the relevant gigaspaces_gsc.log file which it was deployed to. |
One examples Directory
| Change |
5.2 Usage |
6.0 Usage |
| Service Grid examples location |
Service Grid examples (bean, prime, and workflow examples) were located under \ServiceGrid\example. |
Service Grid examples are located under \examples\Advanced\ServiceGrid. |
One lib Directory
| Change |
5.2 Usage |
6.0 Usage |
| Service Grid libraries location |
Service Grid libraries were located under \ServiceGrid\lib. |
All jar files are located under \lib\ServiceGrid. |
| \ServiceGrid\lib\ui files |
These files were located under \ServiceGrid\lib\ui. |
These files are located under \lib\ui. |
Environment Changes
| Change |
5.2 Usage |
6.0 Usage |
| Removal of GS_GRID_HOME and com.gigaspaces.grid.home |
GS_GRID_HOME and com.gigaspaces.grid.home were used. |
The system uses com.gs.home where appropriate. |
| RIO_JARS removal |
RIO_JARS |
Redundant variable. |
| GRID_HOME removal |
GRID_HOME |
com.gs.home |
| GRID_LIB has been renamed |
GRID_LIB |
Renamed to SERVICE_GRID_LIB in shell. |
| GS_GRID_HOME/lib |
GS_GRID_HOME/lib was used. |
Replaced with the already existing com.gigaspaces.grid.lib in override files. |
| JSpaces.jar manifest Class Path entry modification |
|
|
| Removal of rio.jar and boot.jar from the MANIFEST.MF file |
rio.jar and boot.jar were used in the MANIFEST.MF file. |
These jars are now part of the ServiceGrid/gs-lib.jar ServiceGrid/gs-boot.jar |
| setenv GS_JARS system variable modification |
|
|
| setenv GS_JINI_START_CLASSPATH system variable removal |
|
|
One UI
| Change |
5.2 Usage |
6.0 Usage |
| Merging Service Grid UI and GigaSpaces Browser |
The Service Grid UI and GigaSpaces Browser were separate applications, run and used differently. |
The two have been unified into one management center called the GMC (GigaSpaces management Center), where each is a different tab (GigaSpaces Browser – Space View tab, Service Grid – Deployment tab). |
| Running GMC |
Running the Service Grid UI was done using the gs-ui.bat/sh.
The Space Browser used to be run using the SpaceBrowser.bat/sh |
Both are run using \bin\gs-ui.bat/sh. |
Setting Communication Protocol Using Exporters
- In GigaSpaces 6.0 and onwards, all product layers and components use the same, ultra-fast multiplex-based communication protocol. This change boosts performance, and decreases threads and stability of large scale clusters dramatically. It enables better troubleshooting and tuning using a single common configuration.
A partial list of components which use the GenericExporter protocol includes: Jini services (Mahalo, Reggie), Open Spaces, the Service Grid GSM/GSC, GUI, CLI, space/cluster.
| Change |
5.2 Usage |
6.0 Usage |
| Ability to change the protocol layer |
The user worked with LRMI only, while it was possible to switch to regular RMI protocol. |
The user can change to Jini or RMI protocol, simply by editing the services.config file. More details |
| GenericExporter |
- GigaSpaces worked with the LRMI transport layer directly.
- Configuration was defined at the space level, using the space schema.
|
- GigaSpaces works with the GenericExporter, that wraps the LRMI transport layer, allowing the system to use LRMI transparently.
- Configuration is defined at the JVM level, by editing the services.config file. All options can be overridden using system properties. More details
|
| QueryProcessorWorker deprecated in version 6.0.1. |
Enabled a Query Processor as a space worker. |
The QueryProcessorWorker is deprecated, because of the changes made to the product communication protocol (moving to LRMI). The QueryProcessorWorker is not relevant in this version and will be removed in the next release. |
Configuration and Environment Changes
| Change |
5.2 Usage |
6.0 Usage |
| Removal of JSpaces-dl.jar |
JSpaces-dl.jar was used. |
JSpaces.jar is used instead - all references to JSpaces-dl.jar need to point to JSpaces.jar. |
| JSpaces-ui.jar addition |
All GigaSpaces Management Center (previously named GigaSpaces Browser) related classes and resources (tools and isqlviewer packages) were part of the JSpaces.jar. |
All GigaSpaces Management Center (previously named GigaSpaces Browser) related classes and resources (tools and isqlviewer packages) have been moved into the new JSpaces-ui.jar which is located under <GigaSpaces Root>\lib\ui. |
Removal of GigaSpaces root\lib\spring\spring-modules-javaspaces.jar and
GigaSpaces root\lib\spring\spring-modules-javaspaces-src.zip |
Used for the SpringModule-GigaSpaces implementation. |
Replaced with Open Spaces – GigaSpaces' new open-source, Spring-based project. |
Defining HTTP codebase using -Djava.rmi .server.codebase |
When defining your codebase using -Djava.rmi.server.codebase in the command line, the JSpaces-dl.jar/JSpaces.jar, reggie-dl.jar (if reggie was used), and jsk-dl.jar libraries were added by default. |
No jar files are added, meaning you must add all of the relevant jar files yourself. For the required jar files when using GigaSpaces, refer to the Setting Classpath section. |
| Defining HTTP codebase port number |
The HTTP codebase port number was defined dynamically. |
It is possible to define the HTTP codebase port number yourself. If you are externally defining the codebase using -Djava.rmi.server.codebase, you must define a port. If you are using an embedded Webster, make sure the port number you specify is the same port number defined in your container schema:
<embedded-services>
<!-- Starts a Webster HTTP Server
embedded in the container VM
Default value: true -->
<httpd>
...
<!-- The host port the server
socket HTTPD (Webster)
is using is bound to.
Default value: port 9813 but if that is busy
it generates an anonymous port-->
<explicit-binding-port>${com.gs.
embedded-services.httpd.port}
</explicit-binding-port>
<httpd>
|
| Space URL validation XSD |
The resource loader tried to load the Space URL validation XSD from the JSpaces.jar, and if it was not found, for example when running in the IDE, the system broke because of this validation error. |
The resource loader tries to load the Space URL validation XSD from the JSpaces.jar, and if it was not found, for example when running in the IDE, the system uses the Locator.derivePath() which recursively scans all directories under the home directory to load the file. In any event, the system should not break because of this validation error but throw a warning. |
| LoadBalanceImpl has been moved to a different package |
com.j_spaces.core.cluster - cluster schema:
<load-bal-policy>
<load-bal-impl-class>com.j_spaces.
core.cluster.
LoadBalanceImpl
</load-bal-impl-class>
</load-bal-policy>
|
com.gigaspaces.cluster.loadbalance – this effects the <load-bal-impl> tag in all cluster schemas:
<load-bal-policy>
<load-bal-impl-class>com.
gigaspaces.cluster.
loadbalance.LoadBalanceImpl
</load-bal-impl-class>
</load-bal-policy>
|
| New \config\services\advanced-space.config file |
|
This file contains GigaSpaces custom space configuration definitions for advertisement facilities. Specifically, it is used to set the space's JoinManager leasing.
Modifying this file is recommended only for advanced users. See the note below. |
Unregistering Spaces "Disappear" from LUS
This occurs when a large amount of memory is consumed in the process, causing extensive JVM GC spikes. This causes high CPU usage and distracts the LeaseRenewManager (a long GC/CPU clock causes the LeaseRenewManager to miss the default 4 seconds, or a lease renew attempt which causes a space service un-registering event to be fired). If the LUS fires an event to unregister a space, the UI spaces tree node represents it using a special icon. A special logging in the UI is printed as well.
The current solution to avoid spaces unregistering is to add resources (memory, CPU) or spaces, or to tune the LeaseRenewal maxLeaseDuration and roundTripTime. These two values can be configured using the new <GigaSpaces Root>\config\services\advanced-space.config file:
roundTripTime=4000;
maxLeaseDuration=8000;
It is recommended to increase these values to 40000/80000 respectively in case a large cluster is used. Note that this causes a delay when the space recognizes failover, since the active election infrastructure is based on space un-registration.
Jini Modifications
All jar files under <GigaSpaces Root>\lib\jini have been replaced. Make sure you copy all the jar files.
Spring Support
In GigaSpaces 6.0 and onwards, it is recommended to use Open Spaces with GigaSpaces instead of Spring Modules.
If you still have a need for Spring Modules, extract this zip file into your <GigaSpaces Root> directory.
Partition ID
| Change |
5.2 Usage |
6.0 Usage |
| Getting the partition data when initializing the ManageDataSource |
Each ManageDataSource loaded all the data and the space filtered its own partition data. |
In the initialization of the ManageDataSource you are provided with the partition number and the number of partitions. You can use these to load only the data you need for your specific space. |
SQLQuery Changes
| Change |
5.2 Usage |
6.0 Usage |
| Performing Regular Expression Queries as part of SQL Queries is possible using the rlike keyword. |
Regular Expression Queries were performed separately using the RegExQuery class.
SQLQuery was used separately to perform queries using the LIKE syntax. |
Perform Regular Expression Queries as part of the SQLQuery itself:
that have a name that starts with a or c
SQLQuery rquery = new SQLQuery(MyEntry.class.getName(),
"name rlike '(a|c).*'");
Entry[] result = space.readMultiple
(rquery,null,Integer.MAX_VALUE);
The old Regular Expression Queries is deprecated and will be removed in future versions. More details |
| Dynamic query using parameters |
Dynamic queries were performed using templates. |
Dynamic queries can be performed using templates or parameters. It is recommended to use the new option (parameters). If you use templates and parameters together, only the values defined in the parameters are taken into account. More details |
READ_COMMITED Modifier
| Change |
5.2 Usage |
6.0 Usage |
| ReadTakeModifiers is now deprecated |
ReadTakeModifiers |
ReadModifiers is used. (ReadTakeModifiers is deprecated). |
| IJSpace.setReadTakeModifiers(int mod) and IJSpace.getReadTakeModifiers() are now deprecated |
IJSpace.setReadTakeModifiers(int mod) and IJSpace.getReadTakeModifiers() were used. |
IJSPace.setReadModifiers(int mod) and IJSPace.getReadModifiers() are used instead. |
.NET Changes
See the .NET changes list.
Changes to GigaSpaces Examples
Some GigaSpaces examples (JavaSpaces, Data Grid, JMS, and persistency examples) have been removed, as they are not supported anymore. OpenSpaces, benchmark examples, and tutorials remain under the <GigaSpaces Root>\examples folder which includes the following:
.NET and C++ examples exist under the <GigaSpaces Root>\dotnet\examples and <GigaSpaces Root>\cpp\examples folders (unzip the zip file and open the examples folder).
For GigaSpaces example documentation, refer to the Examples Portal.
API Chanages
com.j_spaces.core.IJSpaceContainer Methods Deprecation
| Change |
5.2 Usage |
6.0 Usage |
| getSpace(String spaceName, boolean embedded) deprecation |
public IJSpace getSpace(String spaceName, boolean embedded) |
public IJSpace getSpace(String spaceName) |
| getClusteredSpace(String spaceName, boolean embedded) deprecation |
public IJSpace getClusteredSpace(String spaceName, boolean embedded) |
public IJSpace getClusteredSpace(String spaceName) |
SpaceFinder Changes
| Change |
5.2 Usage |
6.0 Usage |
| Space lookup through SpaceFinder now looks only for started spaces. |
SpaceFinder looked for any space, disregarding its state. |
SpaceFinder lookup returns only valid (started) spaces. |
When performing lookup using the ServiceFinder, you can look only for started spaces by changing the following code:
new ServiceFinder(IJSpace.class, new Entry[] { SpaceName })
to:
Import com.j_spaces.lookup.entry.State;
State state = new State("started");
new ServiceFinder(IJSpace.class, new Entry[] { SpaceName,state })
Space Proxy Changes
| Change |
5.2 Usage |
6.0 Usage |
| getFinderURL() – new method called on the space proxy |
not available |
getFinderURL() returns the SpaceURL of the space it was looked up with, not the space it connected to using IJSpace. Another method is the getURL() – returns the SpaceURL object which initialized that specific space instance. |