Merge dev/binary-protocol
This replaces the text-based IMAP-like protocol used by clients to communicate with the Akonadi Server by a binary protocol. The biggest change is that the client no longer has to construct a QByteArray with the command, instead it just populates a respective structure from Akonadi::Protocol and sends it to the server. The structure will take care of serializing itself into the data stream. This simplifies implementation of the Jobs a lot and speeds sending up, although clients usually only send simple commands, so the performance improvement there is not as notable. Currently the biggest problem is that server can produce the data faster then clients can process them (because server only serializes data, while client also takes care about displaying the data to user), which basically means that client never has to wait for more data. On the other hand that means that the while loop in SessionPrivate::dataReceived() does not break until all responses are processed, which in case of large amounts can cause the UI to block and breaks batch-delivery of items from ItemFetchJob because we never return to event loop. To workaround this we currently force event processing every 1000 iterations of the while loop, however that is rather hackish and proper solution is needed in the long term, lie a congestion control system to ask server to slow down when client buffers get full. This can be implemented at any point. This change is purely internal change to the library implementation and does not affect public API of the libraly in any way. It is however not binary compatible and all client applications and libraries must be rebuilt against this new version. Finally the client library enforces that the server uses exactly the same version of the protocol as the client and will refuse to talk to the server otherwise.
Please register or sign in to comment