Monday February 12, 2007 | cn=Directory Manager All about Directory Server |
LDAP, Transactions, and OpenDSA few days ago, Trey (who, by the way, is doing a tremendous job in his new role as the OpenDS community liaison) wrote about LDAP directory servers versus relational databases. He neglected to mention one of my favorite benefits, which is the standardized protocol (which means that you don't have to rewrite your applications or at the very least change drivers if you switch from one server implementation to another, and you don't really have to worry about what exactly "varchar" means in the particular flavor you're using). But ignoring that, some of the comments were interesting. In this post, I want to focus on the ones regarding the ACID properties of the protocol and the server.First, I do think that it's important to point out that both the Sun Java System Directory Server (through the Berkeley DB) and OpenDS (through the Berkeley DB Java Edition) use an underlying data store that fully supports ACID semantics, and we do make extensive use of transactions when interacting with it. In particular, any time that you need to perform a write operation the server will need to update multiple databases (in particular, the main id2entry DB and any associated indexes), and that is protected with a transaction to ensure that they will all be updated together as a single atomic unit, or if some problem occurs that none of them get updated. We also rely on the transactional nature for recovery in the event that the server isn't stopped gracefully (e.g., if the server should happen to crash or get forcefully killed, or if there's a hardware failure or underlying system crash) so that it comes back to a consistent state. The Directory Server is able to operate in a fully ACID-compliant manner so that any acknowledged change will be guaranteed on stable storage before returning the result to the client (although administrators can also configure the server to relax these restrictions if they can accept the trade-offs for better performance). However, when most people are talking about the ACID-compliant nature (or potential lack thereof) of LDAP directories, they probably aren't talking about the underlying data store. They're talking about what is exposed through LDAP itself. It's true that the core protocol specification doesn't have much in the way of atomicity other than to say that multiple changes included in a single modification should all be applied atomically. However, there are a number of extensions to the protocol that can provide various forms of atomicity. They include:
Posted by cn_equals_directory_manager ( Feb 12 2007, 10:32:26 PM CST ) Permalink Comments [3] Post a Comment: Comments are closed for this entry. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted by nate moser on February 14, 2007 at 12:37 PM CST #
Checks like "if (dirtype == ACTIVE_DIRECTORY) ..." are generally a very bad idea. The set of features supported by a directory type can change over time, and in some cases you can't even do a simple version check because features may be backported. It also doesn't work well for directories that you don't explicitly code to handle, and it puts far too much onus on the developer to know all of the quirks of each directory implementation.
Fortunately, though, there is a standard way of determining the capabilities that a given server supports. This is exposed through attributes like supportedControls, supportedExtensions, and supportedFeatures in the root DSE. If you're wondering whether a particular server supports a given control, then just check for the OID of that control in the supportedControls attribute.
Also, note that the feature you mentioned about automatically cleaning up groups when a user is deleted (or renamed with a modify DN operation) is handled by referential integrity and clients generally shouldn't worry about that. Certainly the Sun Java System Directory Server supports this capability, and most other implementations do as well.
Posted by Neil A. Wilson on February 14, 2007 at 10:57 PM CST #
Posted by Neil A. Wilson on February 14, 2007 at 11:03 PM CST #