User:Bbbush/Collaborative Tracker API
I don't like tracker, but I'd like to use the "search" tab inside foobar2000. Why? Searching in all Linux applications is not feeling good (I hate windows search 4.0 too.) Using a separate process to refresh data is a waste of time and machine cycle. Other than these 2 reason, all searching and indexing programs are very hard to configure. For distributions, there is no default path that an application should monitor by default.
A collaborative tracker is a library, does the following to an application:
- Suggest paths that an application should or may want to monitor, based on the application's category and similar applications.
- Keep a setting of those paths that an application want to monitor, allow applications to add/remove paths at any time.
- Index files in those paths using general text indexing and specific method such as music's metadata.
- Monitor folder/file changes in the paths, update index if necessary.
- Notify applications about changes or status.
- Cache or index file format should not be fragile, be compatible in releases, so user don't need to clear cache manually.
- No standalone process. It is started with application and quit with it too. So index is updated when user actually need the data, and user can wait. Nowadays computers are fast enough if indexing criteria were clear (and an initial indexing have been done.)
- No standalone setting UI. Each application must provide such setting UI, to update paths. (Why provide such "index file size" or "index only when idle" options, if your application will rely on the index to work?)
Some possible scenarios
- If 2 applications are monitoring the same path, however they are in different category. In this situation, the library should help both to work efficiently.
- The library will not update index if no application using it is running. If one application is started, the library will only monitor and update those paths that this application cares, no more no less.
How this affect distributions
Only distributions can suggest possible folder, maybe through a policy package of this library.
- Make use of existing tracker library
- Provide similar API as tracker
- Prove to work (more adaptive to applications and paths, more easy to use, more efficient)
- Easy to implement customized indexing method for a particular application. For example, an application launcher application may want to index only an application's name, summary and description, but not all its .bss and/or .text section.