File and directory locking during online learning

Read and write access to the online learning directory is subject to some restrictions. Only one application can write into the directory at a time. Usually the Knowledge Base Learning Server writes into the directory and therefore owns the write lock. Due to this limitation, it does not make sense to run multiple instances of the Knowledge Base Learning Server at the same time. While one instance is active, the second instance is blocked by the write lock.

The import step from the Project Builder is also considered to be a write access. A locking mechanism makes sure that the Project Builder waits until the current batch is finished in the running Knowledge Base Learning Server. While the import step is running in Project Builder, the Knowledge Base Learning Server waits until this task is finished.

All extraction processes perform a read access to the dynamic Knowledge Bases. A read access is granted even while another application has acquired the write lock to the online learning directory. Only for a very short moment at the end of each batch, while the Knowledge Base Learning Server is saving the updated dynamic Knowledge Bases back to the online learning directory, can the extraction processes be blocked.