1.3 - DirectoryService
The DirectoryService is the core of the server. This is where we process incoming requests and ask the backend for data.
It has an entry point, the OperationManager, which is in charge of pushing the requests into the Interceptors chain, and to protect the server against concurrent modifications.
Then the request is going through every Interceptor being registered for this operation. When we have gone through all the Interceptors, we have reached the PartitionNexus, which is the connection with the backends.
We now just have to determinate which type of Backend we should address, and this is done using the Dn. The request is then transmitted to the Backend, which returns the result.
The result bubbles up through the Interceptors as we unfold the stack stack, up to the OperationManager and to the caller.
The DirectoryService knows about its execution environment : it has a schemaManager instance, it knows about the Interceptors chain, it stores a map of all the pending requests (it's necessary as one may abandon some request), it holds the existing Sessions.
In other word, the DirectoryService is not only the part of the server executing the logic, it also holds the current state of every clients.