R
ramesh.thangamani
I am working on a script which queries LDAP for a group of people and
stores the details in XML preserving the hierarchy. I have used a perl
module to create the XML file, the same module can parse it when
needed. I will also have a perl script to create the XML file daily so
that the details in the XML file are in sync with the LDAP details.
Now the problem here is there can be synchronization problem when the
XML is getting generated
by more than one user running the script at the same time. What could
be the best approach for this problem. Any suggestions ?
- I have seen file locking stuff but not sure what needs to be done
to avoid any issues .
- Will be better to have some timeout and wait to write the file ?.
- Or should I skip if the file has already been created like that etc.
stores the details in XML preserving the hierarchy. I have used a perl
module to create the XML file, the same module can parse it when
needed. I will also have a perl script to create the XML file daily so
that the details in the XML file are in sync with the LDAP details.
Now the problem here is there can be synchronization problem when the
XML is getting generated
by more than one user running the script at the same time. What could
be the best approach for this problem. Any suggestions ?
- I have seen file locking stuff but not sure what needs to be done
to avoid any issues .
- Will be better to have some timeout and wait to write the file ?.
- Or should I skip if the file has already been created like that etc.