Cheshire3 Objects: Server

Description

A Server object is a collection point for other objects, and an initial entry point into the system for requests from a ProtocolHandler. A server might know about several Databases, RecordStores and so forth, but its main function is to check whether the request should be accepted or not and create an environment in which the request can be processed. It will likely have access to a UserStore database which maintains authentication and authorisation information. The exact nature of this information is not defined, allowing many possible backend implementations. Servers are the top level of configuration for the system and hence their constructor requires the path to a local XML configuration file, however from then on configuration information may be retrieved from other locations such as a remote datastore to enable distributed environments to maintain synchronicity.

Implementations
API

Note: the Server API is not well tested and is currently under review
FunctionParametersReturnsDescription
__init__configFile The constructer takes a file path to the configuration file to be parsed and processed.
connectundefinedSessionAccept a connection to the server and perform any per session initialisation
disconnectundefinedundefinedCalled when a connection is dropped to perform any garbage collection or other such tidying.
searchundefinedundefinedHandle a search style request and return response
scanundefinedundefinedHandle a browse/scan style request and return response
sortundefinedundefinedHandle a sort style request and return response
retrieveundefinedundefinedHandle a get/retrieve/present style request and return response
explainundefinedundefinedHandle a get/retrieve/present style request for server metadata
deleteResultSetundefinedundefinedHandle a request to delete an existing result set
addRecordundefinedundefinedHandle a request to add a record to a database
replaceRecordundefinedundefinedHandle a request to replace a record in a database
deleteRecordundefinedundefinedHandle a request to delete a record from a database
indexRecordundefinedundefinedHandle a request to index a specific record
addDatabaseundefinedundefinedHandle a request to create a new database from a configuration
replaceDatabaseundefinedundefinedHandle a request to replace a database configuration
deleteDatabaseundefinedundefinedHandle a request to delete an existing database
indexDatabaseundefinedundefinedHandle a request to re-index from scratch an existing database
authenticateundefinedundefinedHandle authentication of session/request and establish user profile