Frameworks/Akonadi
This is a list of things I want to do in kdepimlibs/akonadi for Frameworks 5.
Akonadi repo structure
Merge client libraries and server into one repository. Main advantage is that we will be able to share more code between server and libraries.
Proposed structure:
/autotests /doc /src /src/agentbase (libKF5AkonadiAgentBase.so - AgentBase, ResourceBase and other classes related to agents. Needs a better name) /src/agentserver (do we actually use it anywhere? Should it just die?) /src/akonadictl (akonadictl utility) /src/asapcat (asapcat utility) /src/common (libKF5AkonadiCommon.so - classes shared between server, core and widgets libraries and other utilities. Does NOT install any (or most of its) public headers) /src/control (akonadi_control utility) /src/core (libKF5AkonadiCore.so - non-UI classes, only Jobs, models, Monitor etc.) /src/core/jobs /src/core/models /src/interfaces (DBus interfaces) /src/qsqlite (Qt's QSQLITE driver fork - better try to upstream it) /src/selftest (based on SelfTestDialog class) /src/server (akonadiserver) /src/widgets (libKF5AkonadiWidgets.so - UI classes, depends on core) /src/widgets/views /src/xml (akonadi/xml library) /tests/akonaditest (akonaditest utility) /tests/fake (fake classes to be used for testing) /tests/searchplugin (akonadi_testsearch_plugin) /tests/testresource (akonadi_knut_resource)
Client libraries
Code changes
Status | Action | Comment | |
---|---|---|---|
DONE | Fix coding-style | We have to follow the Frameworks coding style | |
TO DO | Port to Qt 5 | Make client libraries compile against Qt 5 | <{{{3}}}> |
TO DO | Replace BOOST_STATIC_ASSERT | C++11 has static_assert, to use that | <{{{3}}}>
|
API/ABI changes
Status | Class | Action | Comment | Branch | Assignee |
---|---|---|---|---|---|
TODO | ItemSearchJob | Remove deprecated methods | frameworks | ||
TODO | ItemSync | Make private? | Does not seem to be used anywhere | frameworks | |
TODO | ItemView | Remove deprecated methods | frameworks | ||
TODO | KDSignalBlocker | Remove? | frameworks | ||
TODO | metatypes.h | Remove | master? | ||
TODO | MimeTypeChecker | Maybe remove | This class is able to compare mime types, handling aliases, inheritance, etc. AFAIK Volker once told me this should be in Qt 5, so check whether it's there. Might be worth upstreaming, too | frameworks | |
TODO | PersistentSearchAttribute | Remove deprecated methods | frameworks | ||
TODO | PluginLoader | Remove if Qt 5 plugin system is powerful enough | frameworks | ||
TODO | ProtocolHelper | Share with Server | See the Other Plans section below | frameworks | |
TODO | RecursiveItemFetchJob | Optimize | Emit itemsReceived() signal from underlaying fetch jobs | master | |
TODO | RenameFavoriteDialog | Make private? | frameworks | ||
TODO | ResourceSettings | Remove? | frameworks | ||
TODO | SearchCreateJob | Remove deprecated methods | frameworks | ||
TODO | SelfTestDialog | Make a standalone application | SelfTestDialog is the only user of QtSQL in client libraries. By making it a stand-alone app, we can get rid of one dependency from libKF5AkonadiCore.so | master | |
TODO | StatisticsProxyModel | Remove | frameworks | ||
TODO | SubscriptionJob | Split to CollectionSubscribeJob and CollectionUnsubscribeJob? | Keep the naming consistent | frameworks | |
TODO | TrashFilterProxyModel | Remove? | Does not seem to be used anywhere | frameworks |
Features
Features can mostly be implemented already now in master, but they are something I'd totally love to see in Frameworks.
Status | Action | Comment | |
---|---|---|---|
TO DO | Use ImapStreamParser in client jobs | Will improve performance and memory consumption on client side. Also it's easier to use :) | <{{{3}}}> |
TO DO | (IF POSSIBLE) Share external payload parts helper | Concentrate external parts support into one place for easier maintanence and less code duplication | <{{{3}}}> |
TO DO | Direct streaming of external payload parts | For parts bigger than 4KB, the server can instead of asking client to provide the data send back a file descriptor that client will use to write the data directly to the file. Server can either verify that sizes match, or rely on client library telling the truth. Memory--, performance++ | <{{{3}}}> |
Server
Status | Action | Comment | |
---|---|---|---|
TO DO | Upstream QSQLITE3 driver | I managed to figure out what the actual changes we have in our fork are. They are not implemented optimally, a proper implementation will be more complicated, but generally should ensure better performance. Then we can try to upstream those changes and get rid of the driver for good. | <{{{3}}}> |
TO DO | Remove Nepomuk support | We have Baloo now, we don't need Nepomuk anymore | <{{{3}}}> |
TO DO | Remove SELECT command | See comment at CollectionSelectJob in the table above | <{{{3}}}> |
TO DO | Remove X-AKLIST and X-AKLSUB commands | They are aliases to LIST and LSUB commands from the old days | <{{{3}}}> |
TO DO | Remove EXPUNGE command | Not used. We now delete items right away. | <{{{3}}}> |
TO DO | Remove backward-compatibility with older protocol versions | Some of the handlers still have several paths for supporting older client libraries. We don't even know whether they still work, so just get rid of them. | <{{{3}}}> |
TO DO | Merge NotificationMessages | Merge NotificationMessageV2 and V3 to NotificationMessage | <{{{3}}}> |
TO DO | Remove legacy client support from NotificationManager | Don't use the broadcast notify() signal anymore, only support notification subscribers. | <{{{3}}}> |
TO DO | Refactor DB access | Try to do as much DB interaction as possible in DataStore, so that it can be easily replaced by a FakeDataStore for testing purposes (see "Testable Handlers" below). | <{{{3}}}> |
TO DO | Document ASAP | Properly document all ASAP commands and responses. Ideally should be part of doxygen documentation rather than a plaintext file. | <{{{3}}}> |
DONE | Optimize CacheCleaner (1.12.0) | Right now the CacheCleaner requests all collections every minute and checks their cache policies. Instead we should use some form of scheduling queue. |
Other Plans
Testable Handlers
Does not really depend on Frameworks, can be done at any time. I 'want' to have it done in Frameworks though. Currently we have no way to test Handlers on the server. This would require having a fake DataStore, fake NotificationCollector, fake AkonadiConnection and somehow fake backend for Entities. However, as a result we should be able to send various commands to the handlers and observe whether correct data are stored in database and correct signals are emitted. Big problem with external payload parts, would require a fake ExternalPartManager too.
In a perfect world, we would have Handlers in a shared library and the Handler would be able to parse the command into entities and vice versa. But since the server is using different entities than the client libraries (Akonadi::Server::Collection vs. Akonadi::Collection), this probably won't be possible. However we still should try to share code for handling ImapSets, parsing attributes, payload parts, etc. The first step toward this is to have client jobs use ImapStreamParser.