Object Database (ODB) service framework is defined and managed in the service_manager package
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.
- AwsWorkerBootService manages launching and shutdown of AWS ec2 instances.
- ActiveWebService launches a sockets/Cells-based reactive web service
- CellsTestService tests display and navigation of cells.
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.
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.