MySQL 9.1.0
Source Code Documentation
|
The Service is basic concept of the Components subsystem.
A Service is a named, well-defined stateless interface to one functionality, expressed as a list of pointers to a specific methods. The service name will consist of ASCII symbols excluding the dot ('.') symbol. Each Service will be accompanied with a (part of a) header file that defines the Service allowing other Components to consume it. Each Service should work only on basic C types and structures of these types to prevent problems with not fully-defined C++ objects ABI. The Service is a default way to operate inside the Components subsystem as a mean to show that one is interested only on functionality interface, not its exact implementation. The Services are not versioned - any change to interface must require Service being copied to one with different name before applying changes. The Services by itself do not carry any state, all methods are stateless. This does not prevent one from having some state-carrying objects created and returned as handles to them. Such concept is shown for example in create(), get() and release() methods of the registry_query Service. This concept relies on implementation of generator of the Opaque pointers with d-pointer described here: https://en.wikipedia.org/wiki/Opaque_pointer .
For any specific Service a Service Implementation is defined as a structure of the Service type filled with pointers to methods of specified implementation. The name of the Service Implementation is a name of the Service and the implementation related name separated with a dot. In most cases the implementation related name should be the Component name in which it is being defined. Each Service can have several Service Implementations.