| Lightweight Directory Access Protocol (LDAP) is widely used in the Internet for the information and resources management, to meet a large number of users for online access. To enable Dameng Database managing the directory data, research and implement a directory server which based on the LDAP. The management of directory data's storage and the implementation of directory service are two important components in the server.In the aspect of management for directory data's storage, in order to meet the rapid implementation of query request in directory services, research and design a variety of relational tables in database. Firstly, to speed up the search of directory information tree in the scope of sub tree, add the information of succession between the entries; secondly, to enable the filter in search request can quickly be implemented, collect the attribute types which hold matching rules in a separate attribute table; finally, to reduce the cost of entry data's reorganization in database, storage the whole directory data based on entry as an unit. In the implementation, create a connection pool to satisfy the directory server with high degree of concurrency execution.In the aspect of execution for directory services, translate the LDAP's access request to SQL statement. The database server can manage the directory data through this mechanism. In this component, the execution of query request is the most important one, according to the characteristics of directory data storage, generate the SQL statement together with the scope search. Use a recursive policy to process the query filter, and create cluster and index in relational tables, and reduce the execution cost to optimize SQL statements. The implementation of query request is divided into three stages: firstly, access all entry's ID from the database into query results; secondly, fetch entry's data from database according to entry's ID; finally, organize the entry's attribute list in accordance with query's conditions, which will be returned by the directory server. According to the interactive features between the directory server and database server, research and design two reuse mechanisms for query execution: query request reuse and entry data reuse, the first one holds the entry's ID set of query requests, and the second one holds the entry's data.Simulating a practical application environment, do a performance test for this directory server, in the aspect of the query and concurrence execution efficiency. This system has a significantly improvement than Oracle Internet Directory in the query execution, and be able to meet the high concurrence processing cases. |