Initial work to make optimizer multithreaded
This MR creates the initial work to make the optimizer work to be run in a thread pool.
- Follows the same "design" as the
TransferService
. Creates a thread pool and launch in parallel multiple executor tasks. - It makes the optimizer to use the standard
GenericDbIfce
. This allows eachOptimizerExecutor
to use the singlesoci::connection_pool
to manage the Database connections. - The abstraction on the
OptimizerDataSource
is still kept. The only implementation of "datasource" isDbOptimizerDataSource
which uses theGenericDbIfce
of FTS
TODO:
-
Add a configurable size for the Optimizer Thread pool -
Fix unit tests - This will be quite some work -
Add more instrumentation - Logging how long it takes to optimize individual links and the general optimizer service run -
Do some extra testing to see what happens if one of the thread in the pool gets a DB exception (The code handle it but needs to be checked)
Edited by Joao Pedro Lopes