Networking Considerations

Applications can connect to the metaspace either as full peers to the other peers of the metaspace, at which point they will need to be able to establish and receive TCP connections from all the other full peers of the metaspace (regardless of their role in individual spaces), or as 'remote clients' that connect to the metaspace through establishing a single TCP connection to a proxying ActiveSpaces agent process (itself a fully connected peers).

Fully connected peers will always experience lower latency of execution of the space operations than remote clients, and remote clients will always be limited to join spaces as leeches (rather than be able to join spaces a seeders).

Before establishing TCP connections to each other, the full peers of a metaspace need to 'discover' each other. Discovery can be done by using a reliable multicast protocol using the built-in PGM protocol stack or directly with TCP by listing a set of well known IP addresses and ports. From a configuration standpoint, the easiest option is to use the default built-in PGM reliable multicast protocol, but this assumes that all of the full peers of the metaspace are able to exchange multicast packets with each other over the network.

In this default deployment scenario, metaspace members must be able to both receive each other's multicast transmissions and establish TCP connections to each other. To enable this, firewall settings on the host may have to be adjusted to allow sending and reception of UDP multicast packets on the port specified through the multicast URL used to connect to the metaspace, and to allow incoming and outgoing TCP connections to the ports specified in the listen URL used by the members of the metaspace to connect to it.

Also, if the host has multiple network interfaces, care must be taken to ensure that the member binds its multicast and listen transports to the appropriate interface, that is, to the network that can be used to send or receive UDP multicast packets and establish or accept TCP connections with the other members of the metaspace. The interface to use for each transport can be specified in the associated URL used to connect to the metaspace. If no interface is specified, the ActiveSpaces transport libraries will default to using the default interface for the host such as the interface pointed to by 'hostname').

For more information see Special Considerations for Joining a Space or Metaspace.

Related reference