| Title: 1.3 - DirectoryService |
| NavPrev: 1.2-network.html |
| NavPrevText: 1.2 - Network Layer |
| NavUp: 1-architecture.html |
| NavUpText: 1 - Architecture |
| NavNext: 1.4-interceptors.html |
| NavNextText: 1.4 - Interceptors |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| . |
| http://www.apache.org/licenses/LICENSE-2.0 |
| . |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| # 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. |
| |
| ## Environment |
| |
| 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. |
| |