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

Adding a Nirvana Realm to another's namespace using the Nirvana Enterprise Manager GUI (Federation)

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.

In addition to support for a federated namespace Nirvana also supports clustering where Realm resources such as channels, topics and queues can be replicated across multiple Nirvana realm servers.

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 that you wish to add a realm to.

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 10000 on a localhost is added by specifying the RNAME nsp://localhost:10000. Once the Realm has been added it will appear in the original namespace under the mountpoint of /eur.

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

  • /global/rates which is a local channel and;
  • /eur/global/rates 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.

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 /global/rates on the productionmaster Realm is joined to /global/rates on the /eur 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 /global/rates to /eur/global/rates with a filter of :

DESTINATION='/eur'

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

For more examples of how to create channel joins see our FAQs on using the Enterprise Manager, and Programatically creating joins.

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