-
Notifications
You must be signed in to change notification settings - Fork 10
Pyon Container Implementation Design
This page describes some of the layers and dependencies within the ScionCC framework
The following sections describe the dependency layers of the ScionCC framework from the bottom up. These layers express classes of dependencies, not strict layer interfaces such as in OSI networking.
At the bottom are general purpose utilities, mostly on the putil package that do not depend on gevent monkey-patching or anything else.
Note: Some of the utils inside the pyon.util package could qualify here too, but because pyon pacakge static initialization does automatic monkeypatching, these utils either require or force gevent monkeypatching. A future refactoring may extract them into putil, or remove top level pyon monkeypatching.
The core of the Pyon framework provides configuration management, configured logging, datastore access (Postgres), reliable messaging, interface-described objects and gevent-based cooperative concurrently control (using greenlets).
Note: The pyon framework has a module dependency and bootstrap process, which is quite intricate. Especially at the beginning of starting a Python interpreter, it is important to import modules in the right order and call the pyon bootstrapping.
A ScionCC container can be started after the Pyon framework is initialized. This is the typical form of deployment, but it is not required to start a container. A container makes use of system configuration and starts a set of defined container capabilities under one management root.
Common container capabilities include messaging exchange management, resource registry datastore, directory datastore, event publishing, event subscription, a process manager, a PID file, an interactive shell, an embedded manhole shell etc. See Capability Container for details.
Once a container is running, it can spawn ION processes. These are concurrent threads of execution, typically with a messaging attachment and an interface defined RPC call interface. Deploy files are a common way to instruct the container to start a set of processes, e.g. system services in a defined order.
The container registers itself and hosted processes in directory and resource registry. It fires events when important things happen, e.g. a new process spawned, or a new resource created.
ScionCC comes with a set of core services that offer the basis of a distributed system. These services include identity management, policy management, organization management, resource registry and directory and process management.
A Service Gateway provides secure access to the services via HTTP.
Any application level code can make use of the Pyon framework, ScionCC container and core services. Typically, the application adds additional services, bootstrap processes and background processes to the system deployment. End users would access the application via application services, which would call core services. Core services can be isolated from the outside world and kept secure.
See Messaging Design for details