This is archived documentation for an older version of Nirvana (v2.0). Please refer to documentation for the latest version if required.

Adding a Nirvana Realm to another's namespace using the Nirvana Realm Manager GUI.

A Nirvana Realm is an instance of the server and a container for channels, queues and P2P services. Each Nirvana Realm defines a namespace of its own but it is possible to merge the namespaces of multiple Realms into one large one.

While adding a Nirvana Realm into the namespace of another using the Realm manager you need to know the RNAME of the Realm you are adding in to your the source Realm.

Note: Before adding a Realm to another Realm make sure that the destination Realm has set permissions such that the source Realm has permission to carry out operations.

Note: In order to add one Relm to another's namespace neither Realm can have the same name. By default when a Nirvana Realm is being installed it is called Nirvana. To give the Realm a different name then choose the custom install option during install and give it a different name. Alternatively after installation the nserver.lax file can be edited to change the name. This iis achieved by editing the -DREALM property.

For alternative information on adding a Nirvana Realm to another Realm's namespace please see the following:

Step 1: Right click on the Realm node on the Nirvana namespace of your 'primary' realm manager.

Step 2: Choose the Add Realm option and specify the RNAME of the Realm you wish to add to the namespace. In addition specify a mountpoint so that all of the resources of the Realm you add will become available to sessions under the name /mountpoint.

In the dialog box above the a Realm running on port 13002 on a host called wudan is added by specifying the RNAME nsp://wudan:13002. Once the Realm has been added it will appear in the original namespace under the mountpoint of /bkup.

Sessions connected to the 'primary' realm now hace access to two channels. These are :

  • /FooChannel which is a local channel and;
  • /bkup/FooChannel which is actually a channel on another as specified by the RNAME above.

Once more than one Realm has been added to a namespace channel joins can be added, and the namespace can also be configured such that it can be used for automatic HA failover.

 

Example Usage of a federated Nirvana namespace:

In the example above you could then provide filters for channel joins across the multiple realms you have added to the namespace. This allows you to ensure that events are routed to the correct channel based on the content of the event. For example, if ChannelFoo on the nirvanaPrimary Realm is joined to FooChannel on the /bkup realm. Then automatic data routing can be achieved by publishing event with an nEventProperties dictionary that contains a key called 'DESTINATION'.

If a channel join is created from ChannelFoo to /bkup/FooChannel with a filter of :

DESTINATION='/bkup'

This guarantees only those events that are published to ChannelFoo and that contain '/bkup' in the 'DESTINATION' key will actually be propagated across the channel join.

For further example code demonstrating adding Nirvana Realms to a names space please see out addRealm example.