Foundation Services
Applications can access services that are deployed locally or remotely.
Note: Your foundation service-enabled application can be either
a standard client application or a Web client application that runs in a servlet container.
To locate local and remote services:
The application uses a service loader to instantiate and initialize local services, including its local Discovery Service.
The application initializes and registers the local Discovery Service with a remote Discovery Service. The application locates
the remote Discovery Service by obtaining the Remote Method Invocation (RMI) registry location from a SAS Metadata Repository (or XML
file that contains exported metadata)
and performing an RMI name lookup on the remote Discovery Service. The remote Discovery
Service enables the client to locate remotely deployed SAS Foundation Services.
-
When the application requests a service, its local Discovery Service
first checks to see if the service is a locally registered service.
- If the requested service is a locally registered
service, the application binds to the local service.
- If the requested service is not a locally registered service,
then the local Discovery Service uses the remote Discovery Service to search the remote services deployment for the requested service.
- If the requested service is not registered with the remote Discovery Service, an error is returned.
- If the requested service is registered with the remote Discovery Service, a stub to the remote service is returned and the application can then use the remote service.
For example, in the following diagram, if an application requests the Logging Service, the application will bind to the
local Logging Service. If an application requests the Session Service, the application will use the remote
Discovery Service to locate and bind to the remote
Session Service.
Note: If the application that deploys the remote services also starts the service registry,
the service registry must exist on the same machine as that application.
The following scenarios show examples of local and remote service deployment and access.
|