|
For example, if we had a realm located in the UK
(United Kingdom), and 2 other realms located in the
US (United States) and DE (Germany), we can view the
realms located in DE and US within the namespace of
the UK realm. Federation allows us to access the objects
within the DE and US realms from within the namespace
of the UK realm.
Adding Realms
The first step in order to provide federation is to
add the realms. Adding a realm to another realm can
be achieved 1 of 2 ways. The first way simply makes
a communication connection from one realm to another,
so the realms are aware of each other and can communicate.
This allows you to join
channels between these realms. The second option
also makes a new communication connection, however if
you specify a 'mount point', the realm you
add will also be visible within the namespace of the
realm you added it to.
Mount Points
Providing a mount point for added realms is similar
to the mount point used by file systems when you mount
a remote file system into another. It specifies a logical
name that can be used to access the resources within
the mounted realm. The mount point is therefore the
entry point (or reference) within the namespace for
the realm's channel, queues and services.
For example, if i have a realm in the UK, an i wish
to add to it a realm in the US, i could provide a mount
point of /us when adding the US realm to the UK realm.
Using the mount point of /us, i can then access the
channels within the us realm from my session
with the UK realm. For example, if i performed a findChannel
from my session with the UK realm and provided the channel
name /us/customer/sales, i would be able to get a local
channel reference to the /customer/sales channel within
the US realm.
Using the Enterprise Manager to add realms
In order to add a realm to another realm, first of
all you need to select the realm node from the namespace
that you wish to add the realm to. Then, right-click
on the realm node to display the menu options available
for a realm node. One of the menu options is labelled
'Add Realm to Namespace', clicking on this menu option
will display a dialog that allows you to enter the RNAME
of the realm you wish to add and an optional mountpoint.
This dialog is shown in the image below.

The RNAME value in the dialog corresponds to the realm
interface
you wish the 2 realms to communicate using. The mount
point corresponds to the point within the namespace
that the realm will be referencable.
the image below shows the namespace for a realm that
has had 2 realms mounted within its namespace, called
US and DE respectively. As you can see the channels
and queues within bot the mounted realms are also displayed
as part of the namespace of the UK realm.

Remote Joins
Once you have added the realms to one another, you
are then able to create remote joinis between the channels
of the realms. This is very useful when considering
the physical distance and communications available between
the different realms. For example, if you wish all events
published to the /customer/sales channel in the UK realm
to be available on the /customer/sales channel in the
US realm, one would create
a join from the /customer/sales channel in the UK
to the /customer/sales channel on the US realm, so all
events published onto the uk channel would be sent to
the us channel.
Federation and remote joins provide a huge benefit
for your organization. Firstly, any consumers wishing
to consume events from the uk channel would not need
to do so over a WAN link, but simply subscribe to their
local sales channel in the us. This reduces the required
bandwidth between the us and uk for your organization,
since the data is only sent by the source realm once
to the joined channel in the us, as opposed to 1...n
times where n is the number of consumers in the us.
Remote joins are much more efficient in this respect,
and ensure the data is available as close (physically)
to the consumers as possible. |