Trait mz_orchestrator::Orchestrator

source ·
pub trait Orchestrator:
    Debug
    + Send
    + Sync {
    // Required method
    fn namespace(&self, namespace: &str) -> Arc<dyn NamespacedOrchestrator>;
}
Expand description

An orchestrator manages services.

A service is a set of one or more processes running the same image. See ServiceConfig for details.

All services live within a namespace. A namespace allows multiple users to share an orchestrator without conflicting: each user can only create, delete, and list the services within their namespace. Namespaces are not isolated at the network level, however: services in one namespace can communicate with services in another namespace with no restrictions.

Services must be tolerant of running as part of a distributed system. In particular, services must be prepared for the possibility that there are two live processes with the same identity. This can happen, for example, when the machine hosting a process appears to fail, from the perspective of the orchestrator, and so the orchestrator restarts the process on another machine, but in fact the original machine is still alive, just on the opposite side of a network partition. Be sure to design any communication with other services (e.g., an external database) to correctly handle competing communication from another incarnation of the service.

The intent is that you can implement Orchestrator with pods in Kubernetes, containers in Docker, or processes on your local machine.

Required Methods§

source

fn namespace(&self, namespace: &str) -> Arc<dyn NamespacedOrchestrator>

Enter a namespace in the orchestrator.

Implementors§