|
From: Dejan K. <dej...@nb...> - 2003-04-11 10:37:49
|
Hi all, 1. I am planning to do few refactorings in the scanner module. I am not sure if some of these should be left after 1.0 release but this is what I plan to do: - Renaming few classes. Personaly I think that using term "message" for documents that are found using scanner leads to confusion. So I suggest replacing all occurancies of 'message' to 'document'. For example: ScanMessage -> ScanDocument ScanMessages -> ScanDocuments IScanMessages -> IScanDocuments Would this change cause problems? Should I leave original classes but depracate them (Altough I don't see a benefit since users will probably use only ScannerWorker class). 2. I am also moving most of functionality from ScannerThread to ScannerWorker class. ScannerWorker will perform scanning and feeding the pipeline. It will be abstract class (as it is now) and subclasses will implement few methods for scanning specific resources. Subclassing ScannerWorker should remain the same. Moving logic to ScannerWorker will enable us to use different sheduling methods for the worker. I plan to use Timer and TimerTask for scheduling instead of thread. This will disable paralel working of two scanners since TimerTasks are executed one by one in the same thread. I also plan to add some methods for management purpose to prevent deadlocks. I am not yet sure how this will be implemented but some kind of timeout period should be defined and another thread shoud check each worker if timeout period has elapsed and kill it if it has... 3. I was also thinking of using seconds instead of milliseconds for period option in scanner configuration. Does anybody use scaning period less then 1 second? I guess no. This is also more user - friendly, we should not force users to think as us - developers. I guess milisecods was used in the first place because Thread use miliseconds in its methods (Am I right, Bruce?) Since Babeldoc 1.0 should be released soon, I think 2. should be left for versions after 1.0. 1. and 3. could be changed now. Any opinions? Dejan |