Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Performing Basic TIBCO ActiveSpaces Tasks : Working with Remote Clients

Working with Remote Clients
If you have purchased the TIBCO ActiveSpaces Remote Client in addition to the Enterprise Edition, then you can implement applications that run on remote clients and which communicate with a space running on the core ActiveSpaces cluster.
Java applications that connect remotely to the metaspace need to use the MemberDef's setRemoteDiscovery call to specify the list of well known addresses to connect to.
C applications need to set the Discovery URL attribute in the memberDef object to specify the remote listen URL that was specified when the as-agent was started on a seeder device in the core cluster.
Remotely connected client applications have access to the same features as any other applications, however they can never be seeders on a space. If an application remotely connected asks to get a space as a seeder it will get a handle on the space but will remain a leech. The SEEDED distribution scope is the scope of the proxy client they are connected to.
Also, while remotely connected clients can invoke methods on the space members, on can not invoke methods remotely on a remote client application.
Steps for Connecting a Remote Client
The basics steps for connecting a remote client are:
1.
The remote listen URL specifies on which IP address and TCP port this proxy metaspace member will be listening for remote client connections.
2.
Starting as-agent to Listen for a Remote Client
Start an as-agent with remote_listen parameter that points to a URL and specific port.
Enter the as-agent command as follows:
as-agent –metaspace <“metaspace_name”> –discovery <“discovery_url"> –listen <“listen_url”> –remote_listen <“remote_listen_url”>
For example, assuming that the IP address of the machine where you will run as-agent to set up a seeder is 10.98.200.194, enter:
as-agent –metaspace “agent007” –discovery “tcp://10.98.200.194:5000” –listen “tcp://10.98.200.194:5000” –remote_listen “tcp://10.98.200.194:5001”
This opens up a port on 5001 for the remote client program to communicate with a member in the metaspace, in this case the as-agent.
Connecting to the Seeder from the Remote Client
After the as-agent is running on the seeder, remote clients can connect to a metaspace and a space on the proxy machine.
For an application to connect to a metaspace as a remote client, when connecting to the metaspace, all it needs to do is pass a Discovery URL of the format:
tcp://ip:port?remote=true
Where IP is the IP address and port is the TCP port used by a proxying full peer member of the metaspace to listen for remote client connections (specified in the “remote client listen” URL of that proxying process).
You can now create spaces and perform the normal space operations on the space that is running on the core cluster.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved