2

a fella recommended me to use ApacheDS as a replacement for my database (MySQL) you can find the discussion here i am completely new to LDAP and ApacheDS (actually i had no idea about it yesterday), i searched about it and read some articles , finally i got this page.

considering LDAP a network protocol (if it is) is it possible or is it a wise choice to use LDAP Servers like ApacheDS as a persistence solution for desktop applications ?

doesn't LDAP need an application server (like tomcat) to run? can you please light me up :) thnx

Community
  • 1
  • 1
MoienGK
  • 4,544
  • 11
  • 58
  • 92

3 Answers3

7

LDAP needs an LDAP service to run, like ApacheDS, OpenLDAP or the like. It doesn't need anything else.

There are two advantages of LDAP has over an SQL database.

One is much finer access controls e.g. you can have a "column" which can be updated by anyone in the "adminstrator" group and readable by the user and his/her manager only. The LDAP database can implement your security policy which ensures it is centrally auditable.

LDAP databases tend to have better query and read performance (sometimes by an order magnitude), but much lower write performance (also sometimes by an order of magnitude). This is on the assumption that you use it to look up details e.g. username/password far more often than you change them.

I wouldn't use an LDAP database for logging for this reason.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
  • hmm , nice hint about read/write speed, and i think the nature of being tree causes this difference. isn't it? i am not using LDAP for logging, the application is a kind of small banking application (much much simpler than bank ) i am developing in java, as you know java is not much o hero in desktop applications, so i am trying to tune its performance as much as possible. – MoienGK Sep 12 '11 at 09:14
  • I would have thought most of the performance issues will be around how the GUI is updated. Otherwise there no reason Java would run any slower on an i7 desktop or an i7 server. (Have you tried using the `-server` option ;) – Peter Lawrey Sep 12 '11 at 09:18
  • 1
    My view is that .NET is more popular on desktop due to easy of integration with Windows, Office and Outlook. The GUIs tend to look friendly to windows users. Java is often used on desktops where none of these are important and portability is more important. (I have used a .NET application which only ran on 32-bit windows, not 64-bit windows and we had to buy a laptop especially for it because all our PC were 64-bit) – Peter Lawrey Sep 12 '11 at 09:23
  • Java is not only portable Windows vs Linux, but also portable between all the variants of Windows. I have seen .NET products which were not (produced by companies with large IT resources) – Peter Lawrey Sep 12 '11 at 09:27
  • i wonder how applications like eclipse have better user experience in windows than other applications , it may be because it is not using standard libraries only. but i want that too :D – MoienGK Sep 12 '11 at 09:34
  • The most common problem is doing too much on the GUI event handling thread. Personally I wouldn't do the absolute minimum on the GUI thread and never have it busy/blocking for any period of time. e.g. never make a network call or even a disk access on the GUI thread. I use IntelliJ which is a pure Java swing app and I prefer it to eclipse. (However it sometimes waits for disk which is annoying unless you have an SSD) – Peter Lawrey Sep 12 '11 at 09:42
  • do you care for another late question? :D i understand that ApacheDS is an ldap server, is there any Object directory mapper too? like hibernate for sql? which we may call ODM? – MoienGK Sep 22 '11 at 22:03
  • I would look at one of the no-sql databases http://nosql-database.org/ to see if it does what you want. – Peter Lawrey Sep 23 '11 at 07:20
4

There are many uses of LDAP as a data store for other things than users. As matter of fact, LDAP is often considered as one of the first NoSQL servers. I know of a teleconference software vendor who used an LDAP directory server to replace a SQL database to gain High Availability and distribution. With their software deployed in several locations worldwide, having a single database wouldn't scale, and created issue at the network level. With LDAP and the multi-master replication capabilities of the server, they were able to have a server in each location, to control the replication flows and even leveraged the distributed nature of data to increase their services. Java based LDAP directory servers like Apache DS or OpenDJ (opendj.org) give you flexibility in the deployment and can even be embedded in Java applications such as Web applications.

Finally while LDAP servers were designed for many reads and few writes, servers now are capable of heavy writes (although I would not use them for write only activities such as logging). OpenDJ for example has been tested with up to 15000 modifications / second on a 10 millions users database. The same configuration was able to handle over 60000 searches per second. To be fair, the JVM heap size was 32GB.

Regards,

Ludovic.

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30
  • Nice to see that LDAP could be used for more than simply user management. I discovered LDAP today, as my company in Marseilles considers using it, not only for managing the authentication and access rights of our users, but also for our client contacts. If splitting our infrastructure between an LDAP server, and a MySQL database server for the rest of our web application data, how should I get these two data stores to stay in sync ? The business entities of a client, stored in the database, would need to be linked to the client entity, stored in the LDAP server. – Stephane Jan 21 '17 at 13:30
  • I can't believe it ! What !? There is a company called ForgeRock offering that exact kind of services ? And it's based on this open source platform ? Oh la la... Looking at their videos, the team seems to have a really good time there. And the products could be an answer to my requirements. Looks like the tutorial series on OpenIDM is the way forward for me ! – Stephane Jan 21 '17 at 16:16
0

For deploy LDAP you must ldap server only. For example openldap or ApacheDS. I used openldap as a persistence solution for web application and it worked. There is an important difference: sql is relation but ldap is the tree!

Puzirki
  • 442
  • 5
  • 16