Services
OpenFin provides Application Providers the ability to call a Service that can run along side their application. The service will runs as a singleton processes that provides functionality to other applications running in an OpenFin environment. Services are started and managed by the RVM.
Caution
Services are deprecated as a strategy for new development.
They continue to be supported for customers who have already implemented them.
If you have a requirement that you think might be satisfied by implementing a Service, contact OpenFin Support to discuss possible options.
Key points
- Applications declare the services they want to use in the Application Manifest.
- The lifecycle of Services is managed by the RVM and exists for as long as any applications that require the service are running.
- Only one version of a service can be running on the desktop, and it will extend across all runtime instances on the desktop.
- Services are delivered to the desktop via the OpenFin Cloud or an equivalent on-premise source.
Enabling a Service
To enable a Service, Application Providers need to add a single reference to the Service at the top level of their application’s manifest file:
{
/* other top-level definitions */
"services" :[{
"name": "SERVICE_NAME"
}],
/* other top-level definitions */
}
Architecture and lifecycle
Lifecycle
- During normal application startup the RVM is pointed to an OpenFin Application manifest specifying a Service dependency.
- The RVM resolves the location of the service(s) (see below), defaulting to the OpenFin public cloud (for services offered by OpenFin).
- The RVM starts the service(s) if not already running.
- The RVM starts the OpenFin Application.
- The Client side API running in the OpenFin Application connects to the service via an InterApplicationBus Channel.
The RVM shuts down a service when the last application that has required the service is closed.
Hosting services on-premises
You can configure services to be hosted at your desired location, rather than OpenFin's servers.
You must configure the RVM to look for the service location. You can accomplish this by specifying the service location in the desktop owner settings. (RVM version 4.7+).
Desktop owner settings example
{
/* other top-level DOS properties */
"services": [{
"name": "SERVICE_NAME",
"manifestUrl": "https://SERVER/SERVICE_MANIFEST.json"
}],
/* other top-level DOS properties */
}
Updated 10 months ago