I have two data bases for one system. One is OpenLDAP and another one is MongoDB. To be specific this OpenLDAP is used by Atlassian Crowd that is used by us. I need to synchronize users in these two databases. That is,
- If I create a user it will be defaultly created in the OpenLDAP and it has to be created in the MongoDB as well.
- In past there were issues in handling this and there may be users who are in OpenLDAP but not in MongoDB. I need to find these users also.
- If I delete or update a user from one I need the delete or operation to happen in both DBs.
I am going to have a cache copy of LDAP using Redis. What is the best way to synchronize data between these two databases to match the above expectations?
If it helps I am using Java in backend.