javaldaprmirmiregistry

Rmiregistry vs LDAP


I have recently discovered the Java RMI API and I am using the Rmiregistry to store and get the remote objects.

Then, I saw that we can use LDAP to do this task. I was interseted by this approach but after some research, I became a little bit confused between these two options.

For now, what I have understood is that :

What I would like to know is the pros and cons of each option, and mainly, when (and why) it is recommended to use one instead of the other.


Solution

  • Most people use the Registry. You might use LDAP if you already have an LDAP server, but you wouldn't go to the trouble of installing an LDAP server just for RMI.

    1. The RMI Registry has a rule whereby you can only bind/rebind/unbind on the localhost, where an LDAP server doesn't.
    2. LDAP supports hierarchical namespaces where the RMI Registry's is flat.

    Other than that. I can't think of any major differences.