-
Notifications
You must be signed in to change notification settings - Fork 4
GSIP 4 Status Interface
Summary of proposal
Richard Gould Jody Garnett
Improvement to existing modules
tbd
Interface was created in the community module, wrappers produced for core components. Expect work to be picked up formally by GeoServer developer community when LGPL core formally defined.
JIRA task:
Email discussion:
Other wiki discussions:
A mechanism is needed to inform a client application if all of the modules in a particular GeoServer instance are available and working properly. A specialized module can communicate with other modules in GeoServer to check their configuration status.
Example use case: Client application starts and immediately connects to the server. It checks to see if all of the required modules have started and are available. If not, the client can either abort or it can attempt to perform some other action (such as re-configuring the server).
The only impact this will have on the existing GeoServer modules is that they can implement the Status interface, but they are not required to. The communciating module will be tolerant and will operate only against modules that implement this interface.
The hard part is defining “status” for a module. For now, we will only consider whether a module has been started or not. Each module that implements the Status interface should be able to report an error when one occurs.
A new module will be created that can be queried with Spring remoting from the client. This module will communicate with each of the modules that implement the Status interface (see below) and will forward the responses back to the querying client.
/** To be implemented by each module taking part of startup */
interface Status {
getStatus(): enum { OK, WARNING, ERROR }
getError(): Throwable
}
/**
* Interface used to interact with GeoServer module system from a remote client.
*/
interface Modules {
/** Status of each module in start up order. */
List<Status> getStatusList();
/**
* Reset GeoServer modules, called change to configuration and/or preferences.
* Modules with handles to real resources should be implemented in a smart manner, so as not to recreate connection pools etc.
*/
reset();
}
None that can be forseen.
- Richard Gould
- Jody Garnett