Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.96 KB

service_manager.md

File metadata and controls

38 lines (28 loc) · 1.96 KB

Defining and Managing Object Database Services

Object Database (ODB) service framework is defined and managed in the service_manager package

Services

ODB services extends object_database.service_manager.ServiceBase.Servicebase. The ServiceBase super class manages configurations, resources, introspection, and start/stop/setup/teardown.

ODB comes with a set of default services for convenience and testing purposes.

Service Managers

Services are created using ServiceManager and managed as Service odb objects, which stores configuration and stats and is associated with a particular Codebase that corresponds with a particular ServiceBase subclass defined in a particular git ref.

ServiceManager can be subclassed to use different strategies for launching / managing ServiceWorkers. SubprocessServiceManager uses subprocesses to launch workers. InProcessServiceManager manages workers within the same python process as itself.

Instances and workers

A given Service can have multiple ServiceInstance's running on different ServiceHost's. The ServiceManager uses a separate ServiceWorker to (possibly asynchronously) instantiate, launch, and manage each ServiceInstance.