Subtree Search

When a search operation is received, Penrose will start processing from the entry specified as the base of the search operation, then moving down according to the search scope.

In the above diagram, the base entry is ou=Categories. Since this entry does not have use any sources, Penrose will generate the LDAP entry immediately.

In the second level, the entry uses one source: categories. So, a search operation is issued against the physical data source (e.g. database, LDAP) containing the categories table. For each row in the results, an LDAP entry will be generated.

In the third level, the entry uses two sources: categories (inherited from the parent) and products. Since the sources may reside on different physical data source, the search operations on those sources have to be done separately. The order of processing depends on the search filter. In the above scenario it starts loading the categories first. Since the same operation has been done in the parent entry, it can use the data that is already stored in the cache. Then following the source-relationship graph, it uses the values of categories.id to find the corresponding products. Once all data from all sources have been loaded, it joins the rows and generates the LDAP entries.