diff --git a/site/content/xap/12.3/admin/gigaspaces-browser-menus-and-buttons.markdown b/site/content/xap/12.3/admin/gigaspaces-browser-menus-and-buttons.markdown index 35b3f33f8..a5014948e 100644 --- a/site/content/xap/12.3/admin/gigaspaces-browser-menus-and-buttons.markdown +++ b/site/content/xap/12.3/admin/gigaspaces-browser-menus-and-buttons.markdown @@ -158,7 +158,7 @@ The **Help** menu provides the following options The button toolbar allows you to perform maintenance operations on containers and spaces. -|Syntax|Description| +|Button|Description| |:-----|:----------| | ![ping.gif](/attachment_files/ping.gif) | Pings the selected space | | ![clean_space.gif](/attachment_files/clean_space.gif) | Cleans the selected space | diff --git a/site/content/xap/12.3/admin/gigaspaces-browser-tree-panel-and-configuration-panel.markdown b/site/content/xap/12.3/admin/gigaspaces-browser-tree-panel-and-configuration-panel.markdown index 28972f441..192dd5bf9 100644 --- a/site/content/xap/12.3/admin/gigaspaces-browser-tree-panel-and-configuration-panel.markdown +++ b/site/content/xap/12.3/admin/gigaspaces-browser-tree-panel-and-configuration-panel.markdown @@ -15,15 +15,14 @@ The left hand panel of the Space Browser is the **Grid Tree**. This panel allows ![IMG212.gif](/attachment_files/IMG212.gif) {{% /align %}} -{{%section%}} -{{%column width="5%" %}} -![cluster_node.gif](/attachment_files/cluster_node.gif) -{{%/column%}} -{{%column width="95%" %}} -The **Grid Tree** shows the following main types of nodes: -{{%/column%}} -{{%/section%}} +The **Grid Tree** shows the following main types of nodes. +|Icon|Description| +|:-----|:----------| +| ![space_network_view_icon.gif](/attachment_files/space_network_view_icon.gif) | Root of the Spaces grid tree. | +| ![container.gif](/attachment_files/container.gif) | Space Container node. | +| ![spaceTreeIcon.gif](/attachment_files/spaceTreeIcon.gif) | Space node. | +| ![cluster_node.gif](/attachment_files/cluster_node.gif) | Cluster node. | # Spaces Network View @@ -100,7 +99,7 @@ You can choose to refresh the Space Network view periodically. Select the desire # Space Container Node -|![container.gif](/attachment_files/container.gif) | Right-clicking a space container node (invokes a context menu containing the following options: +Right-clicking a Space container node invokes a context menu containing the following options: {{% align center %}} ![grid_tree_containerNodeSelected_6.5.jpg](/attachment_files/grid_tree_containerNodeSelected_6.5.jpg) @@ -118,14 +117,7 @@ Selecting the space container node also makes available the three leftmost butto {{% anchor spacenode %}} -{{%section%}} -{{%column width="5%" %}} -![spaceTreeIcon.gif](/attachment_files/spaceTreeIcon.gif) -{{%/column%}} -{{%column width="95%" %}} Space nodes represent a single space in the system. -{{%/column%}} -{{%/section%}} **The space node has five possible views:** @@ -153,23 +145,13 @@ When a space node is selected, its configuration data is displayed in the **Serv # Cluster Node -{{%section%}} -{{%column width="5%" %}} -![cluster_node.gif](/attachment_files/cluster_node.gif) -{{%/column%}} -{{%column width="95%" %}} - A cluster is a collection of spaces from one or more space containers. The cluster node in the **Grid Tree** represents a cluster of spaces. {{% refer %}} For more details, refer to the [Cluster View](./cluster-view-gigaspaces-browser.html) section. {{%/refer%}} -{{%/column%}} -{{%/section%}} - - -# Service View panel +# Service View Panel The **Service View** panel takes up most of the Space Browser screen; it is located on the right of the **Grid Tree** panel. This panel shows configuration details for the node selected in the tree on the left, allowing you to edit some of them. diff --git a/site/content/xap/12.3/admin/the-runtime-environment.markdown b/site/content/xap/12.3/admin/the-runtime-environment.markdown index 3766d5681..bafc02ebb 100644 --- a/site/content/xap/12.3/admin/the-runtime-environment.markdown +++ b/site/content/xap/12.3/admin/the-runtime-environment.markdown @@ -17,33 +17,29 @@ To start a Service Grid on a machine, launch the `gs-agent` utility located in t ## Help Run gs-agent with `--help` or `-h` to see all available options: -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash ./gs-agent.sh --help ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash gs-agent --help ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} ## Manager To start a single manager on the local machine (useful for dev and testing): -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash # Starts a local manager: @@ -52,10 +48,8 @@ To start a single manager on the local machine (useful for dev and testing): ./gs-agent.sh --manager-local --gsc=2 ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash REM Starts a local manager: @@ -64,14 +58,13 @@ REM Starts a local manager and 2 GSCs: gs-agent --manager-local --gsc=2 ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} To start a highly-available cluster of managers on several hosts, run the following on each of the designated hosts: -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash # Starts a manager: @@ -80,10 +73,8 @@ To start a highly-available cluster of managers on several hosts, run the follow ./gs-agent.sh --manager --gsc=2 ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash REM Starts a manager: @@ -92,8 +83,8 @@ REM Starts a manager and 2 GSCs: gs-agent --manager --gsc=2 ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} (Note that you also need to configure the `XAP_MANAGER_SERVERS` to the list of designated manager servers) @@ -101,9 +92,8 @@ gs-agent --manager --gsc=2 If you cannot use the manager for some reason, but you still want high-availability, you can pick a couple of hosts to serve for management, and start a LUS and GSM on them: -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash # Starts a LUS and GSM: @@ -112,10 +102,8 @@ If you cannot use the manager for some reason, but you still want high-availabil ./gs-agent.sh --lus --gsm --gsc=2 ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash REM Starts a LUS and GSM: @@ -124,54 +112,48 @@ REM Starts a LUS, GSM and 2 GSCs: gs-agent --lus --gsm --gsc=2 ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} Alternatively, if your environment supports multicast and you prefer a more dynamic approach, you can use the `global` prefix to indicate that GSMs and LUSs will be automatically started and managed by the collective of gs-agents, instead of explicitly on a specific hosts. For example, to start 2 Global GSM and LUS accross a set of hosts, as well as 2 GSCs on each host: -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash # Starts a LUS, GSM and 2 GSCs: ./gs-agent.sh --global.lus=2 --global.gsm=2 --gsc=2 ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash REM Starts a LUS, GSM and 2 GSCs: gs-agent --global.lus=2 --global.gsm=2 --gsc=2 ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} In fact, since this configuration is convenient for new users, it is also the default - running `gs-agent` without any arguments would produce the same effect. If you wish to disable it and start without any components, run gs-agent with `--zero-defaults` or `-z`. This can be useful if you're planning to use the manager's RESTful API from another host to add/remove containers. -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash ./gs-agent.sh -z ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash gs-agent -z ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} # Configuration @@ -187,9 +169,8 @@ The component-specific configuration override the system-wide configuration. For example: -{{% section %}} -{{% column width="50%" %}} -**Linux** +{{%tabs%}} +{{% tab Linux %}} ```bash export XAP_GSA_OPTIONS=-Xmx256m @@ -200,10 +181,8 @@ export XAP_LUS_OPTIONS=-Xmx1g ./gs-agent.sh ``` -{{% /column %}} - -{{% column width="45%" %}} -**Windows** +{{%/tab%}} +{{% tab Windows %}} ```bash set XAP_GSA_OPTIONS=-Xmx256m @@ -214,8 +193,8 @@ set XAP_LUS_OPTIONS=-Xmx1g call gs-agent.bat ``` -{{% /column %}} -{{% /section %}} +{{% /tab %}} +{{% /tabs %}} # Customizing GSA Components diff --git a/site/content/xap/12.3/dev-dotnet/interoperability-of-user-defined-objects.markdown b/site/content/xap/12.3/dev-dotnet/interoperability-of-user-defined-objects.markdown index 884975aef..41d05cd09 100644 --- a/site/content/xap/12.3/dev-dotnet/interoperability-of-user-defined-objects.markdown +++ b/site/content/xap/12.3/dev-dotnet/interoperability-of-user-defined-objects.markdown @@ -22,11 +22,8 @@ Properties mapping: when defining interoperability of properties the names of th For the purpose of explaining the subject we'll look at a Person class (a deep class) - - -{{%section%}} -{{%column width="50%" %}} -**C#** +{{%tabs%}} +{{% tab "C#" %}} ```csharp using GigaSpaces.Core.Metadata; @@ -69,11 +66,8 @@ namespace MyCompany.MyProject.Entities } ``` -{{%/column%}} - -{{%column width="50%" %}} -**Java** - +{{%/tab%}} +{{% tab Java %}} ```java package com.mycompany.myproject.entities; @@ -99,7 +93,7 @@ public class Address } ``` -{{%/column%}} -{{%/section%}} +{{% /tab %}} +{{% /tabs %}} diff --git a/site/content/xap/12.3/dev-dotnet/interoperability.markdown b/site/content/xap/12.3/dev-dotnet/interoperability.markdown index d8f40b1f4..039b37059 100644 --- a/site/content/xap/12.3/dev-dotnet/interoperability.markdown +++ b/site/content/xap/12.3/dev-dotnet/interoperability.markdown @@ -12,9 +12,8 @@ XAP supports easy and efficient communication and access across projects that in # Designing Interoperable Classes -{{%section%}} -{{%column width="50%" %}} - C# +{{%tabs%}} +{{% tab "C#" %}} ```csharp using GigaSpaces.Core.Metadata; @@ -35,10 +34,8 @@ namespace MyCompany.MyProject.Entities } ``` -{{%/column%}} - -{{%column width="50%" %}} - Java +{{%/tab%}} +{{% tab Java %}} ```java package com.mycompany.myproject.entities; @@ -60,8 +57,8 @@ package com.mycompany.myproject.entities; } ``` -{{%/column%}} -{{%/section%}} +{{% /tab %}} +{{% /tabs %}} ## Guidelines and Restrictions diff --git a/site/content/xap/12.3/dev-java/jpa-api-overview.markdown b/site/content/xap/12.3/dev-java/jpa-api-overview.markdown index cb4a5a37a..bb995c283 100644 --- a/site/content/xap/12.3/dev-java/jpa-api-overview.markdown +++ b/site/content/xap/12.3/dev-java/jpa-api-overview.markdown @@ -364,7 +364,7 @@ em.close(); emf.close(); ``` -**JOIN support for one to many relationship (Owner --> List)** +**JOIN support for one to many relationship (Owner --> List<Pet>)** ```java diff --git a/site/content/xap/12.3/dev-java/session-based-messaging-api.markdown b/site/content/xap/12.3/dev-java/session-based-messaging-api.markdown index 6edc39ddb..e54e3bcd2 100644 --- a/site/content/xap/12.3/dev-java/session-based-messaging-api.markdown +++ b/site/content/xap/12.3/dev-java/session-based-messaging-api.markdown @@ -86,8 +86,8 @@ Starting with XAP 8.0.6 Local view using the replication mechanism to update the # Register for Notifications -{{%tabs%}} +{{%tabs%}} {{%tab "DataEventSession"%}} Sessions are created with the `space.newDataEventSession` method. @@ -99,9 +99,10 @@ Example: EventSessionConfig config = new EventSessionConfig(); DataEventSession session = space.newDataEventSession(config); ``` -{{% /tab %}} +{{% /tab %}} {{%tab " Simple Template Registration"%}} + Here is an example for creating the `DataEventSession` and registering for notifications using simple template and cancelling the registration: @@ -119,9 +120,10 @@ public class DataSessionEventExample implements RemoteEventListener } } ``` -{{% /tab %}} +{{% /tab %}} {{%tab " SQLQuery Template Registration"%}} + Here is an example for creating the `DataEventSession` and registering for notifications using a `SQLQuery}`template and cancelling the registration: @@ -140,9 +142,10 @@ public class DataSessionEventExample implements RemoteEventListener } } ``` -{{% /tab %}} +{{% /tab %}} {{%tab " Batch Notification Registration"%}} + When a client expects to receive a large amount of events, it is recommended to deliver the events from the space into the client in batches. Batch notifications minimize the amount of remote calls the space needs to perform in order to deliver the events to the client. The downside when using this approach is the potential of some latency issues when delivering the events to the client. @@ -167,17 +170,19 @@ public class DataSessionEventExample implements RemoteEventListener } } ``` -{{% /tab %}} +{{% /tab %}} {{%tab "EventSession"%}} + The session-based API defines an entity called `EventSession` -- a stateful registration service that is used to register/un-register listeners to the space. The `EventSession` is created using the `space.newDataEventSession` method, and configured using the `EventSessionConfig` entity. -The `EventSessionConfig` can be configured using:
-- A specific API
-- The Properties object
-- The properties file located in the classpath
-- Using a Spring application context
+The `EventSessionConfig` can be configured using: + +- A specific API +- The Properties object +- The properties file located in the classpath +- Using a Spring application context The created session is bound to a specific space (or cluster), and can be bounded to a specific transaction. Closing a session is done via the `close()` method. @@ -190,32 +195,32 @@ EventSessionConfig getSessionConfig(); void close() throws RemoteException, UnknownLeaseException; } ``` -{{% /tab %}} -{{%tab " DataEventSession"%}} +{{% /tab %}} +{{%tab "DataEventSession"%}} + The `DataEventSession` is a unified class that encapsulate the capabilities of the: + * `NotifyDelegator` * `NotifyDelegatorMultiplextor` -The `addListener()` method on the `DataEventSession` receives, among other parameters, the `NotifyActionType` parameter:
-- `NOTIFY_WRITE`
-- `NOTIFY_TAKE`
-- `NOTIFY_UPDATE`
-- `NOTIFY_LEASE_EXPIRATION`
-- `NOTIFY_NONE`
-- `NOTIFY_UNMATCHED`
-- `NOTIFY_MATCHED_UPDATE`
-- `NOTIFY_REMATCHED_UPDATE`
+The `addListener()` method on the `DataEventSession` receives, among other parameters, the `NotifyActionType` parameter: +- `NOTIFY_WRITE` +- `NOTIFY_TAKE` +- `NOTIFY_UPDATE` +- `NOTIFY_LEASE_EXPIRATION` +- `NOTIFY_NONE` +- `NOTIFY_UNMATCHED` +- `NOTIFY_MATCHED_UPDATE` +- `NOTIFY_REMATCHED_UPDATE` {{%note%}} -This type is a type-safe replacement for the old `NotifyModifiers` constants. -Notifications for expired objects sent both from the primary and the backup space (in case you have such). +This type is a type-safe replacement for the old `NotifyModifiers` constants. Notifications for expired objects sent both from the primary and the backup space (in case you have such). {{%/note%}} The `DataEventSession` interface includes the following methods: - ```java public interface DataEventSession extends EventSession { @@ -231,15 +236,14 @@ public interface DataEventSession extends EventSession void removeListener(EventRegistration registration) throws RemoteException, UnknownLeaseException; } ``` -{{%/tab%}} +{{%/tab%}} {{%tab " EventRegistration"%}} The `EventRegistration` is a utility class used as a return value for event-interest registration methods. Objects in this class encapsulate the information needed by a client in order to identify a notification as a response to a registration request, and to maintain that registration request. It is not mandatory for an event-interest registration method to use this class. A registration of interest in an event that occurs in the scope of a transaction is leased in the same way as other event interest registrations. However, the duration of the registration is the minimum length of the lease and the duration of the transaction. In other words, when the transaction ends (either because of a commit or an abort) the interest registration also ends. This is true even if the lease for the event registration has not expired, and no call has been made to cancel the lease. - ```java net.jini.core.event.EventRegistration implements Serializable { @@ -259,42 +263,42 @@ long getSequenceNumber() Object getSource() } ``` -{{% /tab %}} -{{%tab " EventSessionConfig "%}} +{{% /tab %}} +{{%tab "EventSessionConfig"%}} This class is used to configure an `EventSession`. It contains a set of configuration parameters that influence the way event listeners are registered with the space, and how event notifications are processed. -There are three different ways to create an `EventSessionConfig` object:
-- Use the empty constructor, and set the different parameters using API.
-- Pass a `Properties` object, that contains a list of parameters according the a list specified below, to the constructor.
-- Use a pre-configured, named set of parameters. The name is used to load a properties file that resides in the `config` directory
- -The names of the parameters that can be used in the `Properties` object or file:
-- `comType` -- specifies the communication protocol: `UNICAST`/`MULTIPLEX`.
-- `batchSize` -- buffered notifications -- the size of the batch used when sending notifications to the client. Must be used with `batchTime`.
-- `batchTime` -- the maximum elapsed time between two batch notifications. Must be used with `batchSize`.
-- `replicateNotifyTemplate` -- whether to replicate the registration to other spaces in the cluster.
-- `triggerNotifyTemplate` -- whether to send notifications from all spaces in the cluster.
-- `leaseListener` -- `LeaseListener` callback to be called in case the renew failed.
-- `fifo` -- whether to return notification in fifo order or as soon as possible.
+There are three different ways to create an `EventSessionConfig` object: + +- Use the empty constructor, and set the different parameters using API. +- Pass a `Properties` object, that contains a list of parameters according the a list specified below, to the constructor. +- Use a pre-configured, named set of parameters. The name is used to load a properties file that resides in the `config` directory + +The names of the parameters that can be used in the `Properties` object or file: + +- `comType` -- specifies the communication protocol: `UNICAST`/`MULTIPLEX`. +- `batchSize` -- buffered notifications -- the size of the batch used when sending notifications to the client. Must be used with `batchTime`. +- `batchTime` -- the maximum elapsed time between two batch notifications. Must be used with `batchSize`. +- `replicateNotifyTemplate` -- whether to replicate the registration to other spaces in the cluster. +- `triggerNotifyTemplate` -- whether to send notifications from all spaces in the cluster. +- `leaseListener` -- `LeaseListener` callback to be called in case the renew failed. +- `fifo` -- whether to return notification in fifo order or as soon as possible. - `autoRenew` -- whether to automatically renew the lease of the registered listeners. -- `renewExpiration` -- specifies the time of expiration of the registration. Used when `autoRenew=true`.
-- `renewDuration` -- specifies the time for each renew. Used when `autoRenew=true`.
+- `renewExpiration` -- specifies the time of expiration of the registration. Used when `autoRenew=true`. +- `renewDuration` -- specifies the time for each renew. Used when `autoRenew=true`. - `renewRTT` -- specifies the time that takes the Lease to renew. Used when `autoRenew=true`. -{{% /tab %}} +{{% /tab %}} {{% /tabs %}} - # Receive the Event {{%tabs%}} -{{%tab " RemoteEventListener"%}} +{{%tab "RemoteEventListener"%}} The `RemoteEventListener` interface should to be implemented to receive the notification from the space. The class implementing this interface does not need to be the object that originally registered interest in the occurrence of an event. To allow the notification of an event's occurrence to be sent to an entity other than the one that made the interest registration, the registration call needs to accept a destination parameter, which indicates to which object the notification should be sent. This parameter must be an object which supports the `RemoteEventListener` interface. - ```java public interface net.jini.core.event.RemoteEventListener extends Remote, EventListener { @@ -305,7 +309,6 @@ public interface net.jini.core.event.RemoteEventListener extends Remote, EventLi Below, the `DataSessionEventExample` implements the `RemoteEventListener`. The `EntryArrivedRemoteEvent` is used to retrieve the object that starts the event: - ```java public class DataSessionEventExample implements RemoteEventListener { @@ -321,9 +324,9 @@ public void notify(RemoteEvent theEvent) throws UnknownEventException, RemoteExc } } ``` -{{% /tab %}} -{{%tab " EntryArrivedRemoteEvent"%}} +{{% /tab %}} +{{%tab "EntryArrivedRemoteEvent"%}} The `EntryArrivedRemoteEvent` allows you to retrieve the object that triggered the event, as well as retrieving additional meta data about the event. @@ -361,16 +364,18 @@ The `EntryArrivedRemoteEvent` includes the following methods: ``` -{{% /tab %}} +{{% /tab %}} {{% /tabs %}} # Notify-Recovery + When a partitioned space is started each partition getting list of existing notify registrations from the other partitions. This is useful when the partition fails and restarted. This avoids the client side to re-issue a new notify registrations against the restarted partition. If you are not using notifications or running a partitioned space with backups you may disable this mechanism using the cluster-config.notify-recovery property (boolean property). This will speed up the space deployment time since when a partition looking for the other partitions and these have not been started yet, it might take some time for the entire clustered space to be fully available. By default this property is enabled (true). # Cancelling Registration and Closing the Session + {{%tabs%}} -{{%tab " Cancelling Notify Registration"%}} +{{%tab "Cancelling Notify Registration"%}} To cancel the notify registration, call the following: @@ -379,9 +384,9 @@ To cancel the notify registration, call the following: ``` This frees the relevant resources allocated to manage the notify registration, such as cancelling the automatic lease renewal, un exporting object client stubs, and releasing the client FIFO thread. -{{% /tab %}} -{{%tab " Closing the Session"%}} +{{% /tab %}} +{{%tab "Closing the Session"%}} To close the session, call the following: ```java @@ -389,23 +394,21 @@ To close the session, call the following: ``` This cancels all the registrations done with the `DataEventSession`. You need to start a new session in order to register for new events. -{{% /tab %}} -{{% /tabs %}} - - +{{% /tab %}} +{{% /tabs %}} # Filtering Events + The session messaging API allows for space-side notify filtering. To control the events delivered to the client, implement the `INotifyDelegatorFilter` interface, pass the object implementing the `INotifyDelegatorFilter`, and return a `false` value from the `INotifyDelegatorFilter.process` for events you do not want to be sent to the registered client. {{%tabs%}} -{{%tab " INotifyDelegatorFilter"%}} +{{%tab "INotifyDelegatorFilter"%}} The `INotifyDelegatorFilter` allows you to execute business logic at the space side before the event is delivered to the client. The `INotifyDelegatorFilter` might prevent a specific event from being delivered to the client registered for the matching event, by returning `false` from the process method. The `INotifyDelegatorFilter` interface includes the following methods: - ```java public interface INotifyDelegatorFilter extends Serializable { @@ -420,11 +423,11 @@ public interface INotifyDelegatorFilter extends Serializable public void close(); } ``` -{{% /tab %}} -{{%tab " INotifyDelegatorFilter Implementation Example"%}} -Below is an example for the `INotifyDelegatorFilter` implementation, where the `process()` method allows only messages with the value `aaa` to be delivered to the client: +{{% /tab %}} +{{%tab "INotifyDelegatorFilter Implementation Example"%}} +Below is an example for the `INotifyDelegatorFilter` implementation, where the `process()` method allows only messages with the value `aaa` to be delivered to the client: ```java package com.j_spaces.examples.sessionevent; @@ -468,7 +471,6 @@ public class MyNotifyFilter implements INotifyDelegatorFilter The notify registration: - ```java EventSessionConfig config = new EventSessionConfig(); DataEventSession session = space.newDataEventSession(config); @@ -492,18 +494,13 @@ When writing the following objects, only `msg1` is delivered to the client who r The `INotifyDelegatorFilter` implementation class should be part of the space classpath. {{%/note%}} -{{% /tab %}} +{{% /tab %}} {{%/tabs%}} - - - - - # Advanced Options - ## Registering Large Number of Listeners + When having a system that requires large number of listeners (above few hundreds) the `Multiplex` communication mode should be used. With this mode the amount of resources (threads) used to invoke the listener are shared between all the session listeners. This approach reduces the memory footprint of the client considerably. This option avoiding the need to construct multiple [notify containers|notify container] that may consume large amount of resources when having many of these created. See below how the `MULTIPLEX` communication mode should be used: ```java @@ -520,6 +517,7 @@ When having a system that requires large number of listeners (above few hundred ``` ## Auto Re-Register Notifications After Space Failure + Event Session under the hood uses Notification Registration. When a remote client with an independent life cycle creates a Event Session and is terminated, the registration remains in the space. This may create an overhead for the space once there are other clients registered with many templates. To avoid this overhead, an optimization is required where notification registration is created with a limited lease and the client periodically renews the lease to keep it active. If client is shutdown or does not need this events anymore, the lease is not renewed thereby removing the registration. @@ -537,7 +535,6 @@ setAutoRenew(boolean renew, net.jini.lease.LeaseListener listener) setAutoRenew(boolean renew, net.jini.lease.LeaseListener listener, long renewExpiration, long renewDuration, long renewRTT) ``` - |Property| Description | Default | Unit | |:-------|:------------|:--------|:-----| |renew|If set to `true`, automatically performs lease renewal and call the `LeaseListener.notify()` if fails to renew, where the lease's desired expiration time has not yet been reached.|false| | @@ -551,7 +548,6 @@ Prior calling the `LeaseListener.notify()` , the `LeaseRenewalManager` used by t LeaseListener Implementation: - ```java public class MyLeaseListener implements LeaseListener{ @@ -599,9 +595,11 @@ The space includes a mechanism that detects stale notify registrations. Once a n The root cause of this behavior is the thread pool within the space engine that is responsible for delivering events to clients. When all pool threads are fully consumed, notification delivery time suffers, due to the time it takes to detect and remove all stale registrations. {{%note "Thread pool size"%}} -To configure the notification thread pool size you should use the following Space properties:
-space-config.engine.notify_min_threads
-space-config.engine.notify_max_threads
+To configure the notification thread pool size you should use the following Space properties: + +- `space-config.engine.notify_min_threads` +- `space-config.engine.notify_max_threads` + See the [Scaling Notification Delivery](./notify-container-overview.html#Scaling Notification Delivery) for details. {{%/note%}} @@ -611,7 +609,7 @@ To reduce the amount of stale registrations, register notification with a reason When the space is running in a different JVM than the client that is registered for the notifications, remote calls between the space and the notified client are involved. This means that the object that triggered the notification sent as part of the `RemoteEvent` is serialized at the space side, and de-serialized at the client side when delivered to the client. To minimize the impact of the serialization process, it is recommended to implement the `Externalizable` interface -- this optimizes the footprint of the delivered packet across the network. -## FIFO Based Notifications +## FIFO-Based Notifications When registering for notifications in FIFO mode, a special thread at the client side is responsible for delivering the events to the listener in FIFO order. By default, the space uses a dedicated thread pool to trigger the events at the client side, where the client itself is using another thread pool to call the listener notify method implementation. @@ -623,7 +621,6 @@ For the custom client-side FIFO-based notifications example, send a request to s ## Notification Reliability - Notifications are asynchronous by nature. The client that triggered the notification is unaware of the notification delivery, and does not wait for an acknowledgement from the client receiving the notification for successful arrival of the event before continuing with its operation -- i.e., when process A registers for notification delivery, and B writes an Entry to the space, process B does not wait for process A to receive the notification before taking control after the write operation. Process B might perform additional space operations before process A receives the notification. {{%align center%}} @@ -632,8 +629,9 @@ Notifications are asynchronous by nature. The client that triggered the notifica When a space running in a fault tolerant configuration (`primary-backup` or `partitioned` cluster schemas) and the primary space fails, the backup space takes over and sends the notifications to the registered clients. In such a configuration, the primary and backup spaces do not establish a handshake mechanism when a notification is sent to the client. The backup space, that is running in stand-by mode, is unaware of the notifications that have been sent by the primary space, and the acknowledgement that the recipients clients provided when receiving the events is not sent. -To allow the backup space to send notifications when the primary fails and move to active mode, the backup space should have the notification registration information (notify templates) replicated/recovered from the primary space. The cluster configuration includes the following properties allowing notification registrations to survive space failures:
-* `replicate-notify-templates` -- boolean value. Set to `true` if you want to make notification templates available in the target space.
+To allow the backup space to send notifications when the primary fails and move to active mode, the backup space should have the notification registration information (notify templates) replicated/recovered from the primary space. The cluster configuration includes the following properties allowing notification registrations to survive space failures: + +* `replicate-notify-templates` -- boolean value. Set to `true` if you want to make notification templates available in the target space. * `trigger-notify-templates` -- boolean value. Set to `true` if you want to trigger matching notification templates when Entries are written to the space, because of replication (and thus causing remote events to be generated and sent to the notify template listeners). If set to `true`, triggering occurs; if set to `false`, triggering does not occur. ### Replicate Notify Template and Trigger Notify Template @@ -642,7 +640,6 @@ The replication settings allows replicating notification registration, and the a Here is the system behavior when using these options: - |Replicate Notify Template Setting | Trigger Notify Template Setting | Description | |:---------------------------------|:--------------------------------|:------------| | true | false | The client gets notifications from the master space while it is active after registration.
If failover has been configured, it gets notifications from the replica space when the master space fails. | @@ -661,18 +658,17 @@ This means that during this very short period of time, the registered client mig To ensure notification delivery by the backup space during the failover period, durable notifications mode needs to be enabled: - ```java EventSessionConfig config = new EventSessionConfig(); config.setDurableNotifications(true); DataEventSession session = space.newDataEventSession(config); ``` - Durable notifications are based on the replication mechanism and as such have some different semantics regarding other `EventSessionConfig` parameters. For further details see [Durable Notifications](./durable-notifications.html). ## The UNMATCHED NotifyActionType + The `UNMATCHED` `NotifyActionType` should be used when you would like to receive notifications for objects which got their value been updated where the object that was initially matches the template no longer matches the template. Example: You would like to maintain within the client side a list for all the objects which got their status as `true`. You register for notifications using a template which had the status field as `true`. @@ -684,6 +680,7 @@ Registering a notification using a template which got `status=true` with the `NO You have to include the `UNMATCHED NotifyActionType` to receive a notification when the object changing `status=true` to `status=false`. ## The MATCHED_UPDATE NotifyActionType + The `MATCHED_UPDATE` `NotifyActionType` should be used to receive notifications for entries that match a given notify template after being updated and did not match before that update. Example: @@ -695,6 +692,7 @@ Example: myPojo.setProcessed(true); gigaSpace.write(myPojo); // myPojo, after being updated, matches the template. ``` + The last operation (updating myPojo's 'processed' property from false to true) will trigger the NotifyActionType.NOTIFY_MATCHED_UPDATE notification. NOTIFY_MATCHED_UPDATE and NOTIFY_UPDATE cannot be used together for the same listener. @@ -718,5 +716,4 @@ The last operation (updating myPojo's 'processed' property from false to true) w The first write of myPojo would have triggered the NotifyActionType.NOTIFY_WRITE notification if there was also a registration with NOTIFY_WRITE type and the same template. {{%/note %}} -NOTIFY_REMATCHED_UPDATE and NOTIFY_UPDATE cannot be used together for the same listener. - +NOTIFY_REMATCHED_UPDATE and NOTIFY_UPDATE cannot be used together for the same listener. \ No newline at end of file diff --git a/site/content/xap/12.3/security/securing-your-data.markdown b/site/content/xap/12.3/security/securing-your-data.markdown index eb1dea13c..502573b5d 100644 --- a/site/content/xap/12.3/security/securing-your-data.markdown +++ b/site/content/xap/12.3/security/securing-your-data.markdown @@ -6,16 +6,12 @@ parent: securing-xap-components.html weight: 200 --- - - - # Secured Space A secured embedded Space protects access (to data), which is granted only to users with sufficient privileges. When a remote Space proxy connects to a secured Space, it must provide security credentials (usually the username and password, as explained in [Custom Security](./custom-security.html) regarding extensions). {{%tabs%}} -{{%tab " Namespace "%}} - +{{%tab "Namespace"%}} ```xml @@ -24,8 +20,7 @@ A secured embedded Space protects access (to data), which is granted only to use ``` {{% /tab %}} -{{%tab " Plain XML "%}} - +{{%tab "Plain XML"%}} ```xml @@ -40,8 +35,7 @@ A secured embedded Space protects access (to data), which is granted only to use ``` {{% /tab %}} -{{%tab " Code "%}} - +{{%tab "Code"%}} ```java SpaceProxyConfigurer spaceProxyConfigurer = new SpaceProxyConfigurer("space").credentials("sa", "adaw@##$"); @@ -54,8 +48,7 @@ GigaSpace gigaSpace = new GigaSpaceConfigurer(spaceProxyConfigurer).gigaSpace(); An embedded Space can be configured with internal services (Space filters, Notify/Polling containers, etc.), which must have privileges to operate on the embedded Space. These privileges are propagated by the security credentials provided when creating a Space. {{%tabs%}} -{{%tab " Namespace "%}} - +{{%tab "Namespace"%}} ```xml @@ -64,8 +57,7 @@ An embedded Space can be configured with internal services (Space filters, Notif ``` {{% /tab %}} -{{%tab " Plain XML "%}} - +{{%tab "Plain XML"%}} ```xml @@ -80,11 +72,10 @@ An embedded Space can be configured with internal services (Space filters, Notif ``` {{% /tab %}} -{{%tab " Code "%}} +{{%tab "Code"%}} The security credentials can be either be supplied as a `UserDetails` object, or in its simpler form of two Strings (username and password). These are used to _implicitly_ create a secured Space, with security privileges being propagated to internal services. - ```java EmbeddedSpaceConfigurer urlSpaceConfigurer = new EmbeddedSpaceConfigurer("space").userDetails("user", "password"); GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurer).gigaSpace(); @@ -96,8 +87,7 @@ GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurer).gigaSpace(); An embedded Space with no internal services can be simply configured as secured. {{%tabs%}} -{{%tab " Namespace "%}} - +{{%tab "Namespace"%}} ```xml @@ -106,7 +96,7 @@ An embedded Space with no internal services can be simply configured as secured. ``` {{% /tab %}} -{{%tab " Plain XML "%}} +{{%tab "Plain XML"%}} ```xml @@ -117,10 +107,9 @@ An embedded Space with no internal services can be simply configured as secured. ``` {{% /tab %}} -{{%tab " Code "%}} +{{%tab "Code"%}} The `secured` Space URL property indicates that the Space being created should be secured. - ```java EmbeddedSpaceConfigurer urlSpaceConfigurer = new EmbeddedSpaceConfigurer("space?secured"); GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurer).gigaSpace(); @@ -128,7 +117,6 @@ GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurer).gigaSpace(); The `secured` URL property is also exposed as a convenient `.secured(true)` method call. - ```java EmbeddedSpaceConfigurer urlSpaceConfigurer = new EmbeddedSpaceConfigurer("space").secured(true); GigaSpace gigaSpace = new GigaSpaceConfigurer(urlSpaceConfigurer).gigaSpace(); @@ -141,12 +129,10 @@ For security reasons, you may not want to expose the security credentials in you # Processing Unit - A Processing Unit by itself is not secured. It inherits its security from the managing GSM and GSC. These protect the Processing Unit from being restarted, relocated, destroyed, and undeployed. A Processing Unit (for example, a feeder application) may access a secured Space using a remote Space proxy. - ```xml @@ -155,7 +141,6 @@ A Processing Unit (for example, a feeder application) may access a secured Space The `username` and `password` can also be supplied using a `pu.properties` file supplied during deployment. If these are supplied, they will be used to _implicitly_ connect to a secured Space, returning an authenticated proxy for this user. - ```java #pu.properties security.username=user @@ -164,7 +149,6 @@ security.password=password `security.username` and `security.password` are constant property keys. If you want to set your own property placeholders, such as `$\{mySpace.username\}` and `$\{mySpace.password\}`, you must use plain XML configuration. These properties have to be injected at deploy time, by some property resolver. - ```xml @@ -177,7 +161,6 @@ security.password=password ``` - Using the CLI `deploy` command, embed the username and password matching the placeholders given in the `pu.xml`: ```xml @@ -190,7 +173,6 @@ Leaving the username and password exposed (in pu.xml/pu.properties) isn't secure Here is how the CLI deploy command would look like: - ```xml @@ -220,8 +202,7 @@ The local cache [Java version](../dev-java/local-cache.html) \|[ .NET version](. Security is enforced by the remote Space, and the proxy should be acquired by supplying the username and password. {{%tabs%}} -{{%tab " Local Cache Configurer "%}} - +{{%tab "Local Cache Configurer"%}} ```java SpaceProxyConfigurer spaceProxyConfigurer = new SpaceProxyConfigurer("space").credentials("user", "password"); @@ -232,7 +213,7 @@ GigaSpace localCache = new GigaSpaceConfigurer(configurer.localCache()).gigaSpac ``` {{% /tab %}} -{{%tab " Local Cache Namespace "%}} +{{%tab "Local Cache Namespace"%}} ```xml @@ -253,11 +234,9 @@ GigaSpace localCache = new GigaSpaceConfigurer(configurer.localCache()).gigaSpac # Local View - {{%tabs%}} {{%tab "Local View Configurer"%}} - ```java SpaceProxyConfigurer spaceProxyConfigurer = new SpaceProxyConfigurer("space").credentials("user", "password"); GigaSpace remoteSpace = new GigaSpaceConfigurer(spaceProxyConfigurer).gigaSpace(); @@ -303,10 +282,9 @@ The username and password supplied when creating a Space are used to _implicitly A filter can be registered for `before-authentication` events. Before a client tries to authenticate, any filter with the `before-authentication` operation-code is invoked. The `SpaceContext` supplied as part of the call holds a `SecurityContext` that has the `UserDetails` object. {{%tabs%}} -{{%tab " Namespace "%}} +{{%tab "Namespace"%}} The following Spring configuration registers this filter for `before-authentication` (6) operation: - ```xml @@ -321,10 +299,9 @@ The following Spring configuration registers this filter for `before-authenticat ``` {{% /tab %}} -{{%tab " Annotations "%}} +{{%tab "Annotations"%}} An example of a simple POJO filter using annotations: - ```xml @@ -340,7 +317,6 @@ An example of a simple POJO filter using annotations: The annotated method must have `SpaceContext` as a parameter. {{%/note%}} - ```java //Delegate Filter public class SimpleFilter { @@ -358,11 +334,10 @@ public class SimpleFilter { ``` {{% /tab %}} -{{%tab " Method listings "%}} +{{%tab "Method listings"%}} The following Spring configuration XML shows how the filter can be configured using explicit method listings (in this case, annotations are not required). Note the `before-authentication` method adapter. - ```xml @@ -375,12 +350,11 @@ Note the `before-authentication` method adapter. ``` {{% /tab %}} -{{%tab " Embedded-space operations "%}} +{{%tab "Embedded-space operations"%}} _Implicitly_ create a secured Space, with security privileges that are propagated to the filter. These privileges should be sufficient for operations being performed by the filter on the embedded Space. - ```xml @@ -396,23 +370,20 @@ These privileges should be sufficient for operations being performed by the filt The filter acquires a GigaSpaces reference on filter initialization. Now the filter can perform operations on the embedded secured Space. - ```java public class SimpleFilter { - - GigaSpace gigaSpace; - + GigaSpace gigaSpace; @OnFilterInit void init(IJSpace space) { gigaSpace= new GigaSpaceConfigurer(space).gigaSpace(); } - @BeforeWrite public void beforeWrite(Data data) { int seq = gigaSpace.count(new Data()); //Needs 'Read' privileges for 'count' operation data.setSeq( seq++); data.setTimestamp( new Date()); } +} ``` {{% /tab %}} @@ -428,7 +399,6 @@ The `SpaceContext` may be `null` when related to replication/recovery and filter The filter can be declared just like any other filter, but note that the `priority` plays a role in the order of filter execution. The default priority is zero. - ```xml @@ -443,8 +413,7 @@ The filter can be declared just like any other filter, but note that the `priori Usage examples: {{%tabs%}} -{{%tab " Access based on user name "%}} - +{{%tab "Access based on user name"%}} ```java public class CustomAccessControlFilter { @@ -466,8 +435,7 @@ public class CustomAccessControlFilter { ``` {{% /tab %}} -{{%tab " Access based on role and field data "%}} - +{{%tab "Access based on role and field data"%}} ```java public class CustomAccessControlFilter { @@ -497,7 +465,6 @@ Tasks [Java version](../dev-java/task-execution-overview.html) \|[ .NET version] The following is a simple implementation of a task that performs a 'count' operation on the Space. - ```java private static final class MyTask implements Task { @TaskGigaSpace @@ -511,7 +478,6 @@ private static final class MyTask implements Task { While executed tasks are effective when co-located, you may require operations on the cluster. - ```java GigaSpace clustered = gigaSpace.getClustered(); ``` @@ -526,14 +492,12 @@ Executor-based remoting [Java version](../dev-java/executor-based-remoting.html) # Event-Driven Remoting - [Event-driven remoting](../dev-java/event-driven-remoting.html) allows you to use remote invocations of POJO services with the Space as the transport layer, using a polling container on the Space side to process the invocations. Under the wires, event-driven remoting uses the Space write and take capabilities. As such, you must have Write and Take privileges (at both ends) for class `org.openspaces.remoting.EventDrivenSpaceRemotingEntry`. # JDBC Driver XAP allows applications to connect using a [JDBC driver](../dev-java/jdbc-driver.html). A XAP JDBC driver accepts SQL statements, translates them into Space operations, and returns standard result sets. To acquire a connection to a remote secured Space, provide the credentials (username and password) as parameters to the connection. - ```java Class.forName("com.j_spaces.jdbc.driver.GDriver").newInstance(); String url = "jdbc:gigaspaces:url:jini://*/*/space"; @@ -544,4 +508,4 @@ Statement st = conn.createStatement(); {{% note "Note"%}} An alternative method for querying the Space using SQL syntax is the [SQLQuery](../dev-java/query-sql.html) class, with a privileged GigaSpace proxy. -{{%/note%}} +{{%/note%}} \ No newline at end of file diff --git a/site/content/xap/12.3/started/insightedge-in-5-minutes.markdown b/site/content/xap/12.3/started/insightedge-in-5-minutes.markdown index bea343b83..9ef34f63c 100644 --- a/site/content/xap/12.3/started/insightedge-in-5-minutes.markdown +++ b/site/content/xap/12.3/started/insightedge-in-5-minutes.markdown @@ -20,26 +20,27 @@ It takes just a few simple steps to start InsightEdge using the CLI. **To begin working with InsightEdge:** 1. Download the InsightEdge package from the GigaSpaces website and install it, as described in [Downloading and Installing](./installation.html). -2. From the <INSIGHTEDGE_HOME> directory, open the `xap-license.txt` file and apply the "tryme" license key, which will give you access to the InsightEdge features and functionality for 24 hours. +1. From the <INSIGHTEDGE_HOME> directory, open the `xap-license.txt` file and apply the "tryme" license key, which will give you access to the InsightEdge features and functionality for 24 hours. + ``` # License can also be set via the XAP_LICENSE environment variable or com.gs.licensekey system property tryme ``` -
+ {{%note%}} For more information about InsightEdge license options, see the [Product License](./license-key.html) page. {{%/note%}} 3. Navigate to the following directory and start the CLI: {{%tabs%}} -{{%tab " Linux/Mac "%}} +{{%tab "Linux/Mac"%}} ``` /bin ``` {{% /tab %}} -{{%tab " Windows "%}} +{{%tab "Windows"%}} ``` \bin @@ -47,17 +48,17 @@ For more information about InsightEdge license options, see the [Product License {{% /tab %}} {{% /tabs %}} -
+ 4. Run the following command in the CLI: {{%tabs%}} -{{%tab " Linux/Mac "%}} +{{%tab "Linux/Mac"%}} ``` ./insightedge demo ``` {{% /tab %}} -{{%tab " Windows "%}} +{{%tab "Windows"%}} ``` insightedge demo @@ -65,7 +66,7 @@ insightedge demo {{% /tab %}} {{% /tabs %}} -
+ The InsightEdge environment includes a number of components, and may take up to a minute to finish initializing.