<div dir="ltr">Hey everyone!<br><br>As you may know, I'm working on a new resource for Akonadi that would enable syncing EteSync contacts, calendar and tasks to Kontact. I have implemented contacts/address books sync [0], and will now start working to extend functionality to calendars and tasks. I have some questions to ask before I start working on that. Here they are:<br><br>1. As this is a network backend resource, should *all* network calls be in async KJobs? <br>Currently, I have two async jobs, each of which may have to fetch a lot of data (retrieveCollections() and retrieveItems()). I understand that network calls may take indefinite time to complete, and so async jobs make sense. However, I have a lot of one-line network function calls in my code too (Example: see [1]). Should I implement jobs for those too? I'm not able to decide on the trade-off between a convoluted implementation (with jobs), and the current in-line calls, which I'm not sure cause trouble or not.<br><br>2. Is there such a thing as too much abstraction? I sometimes have the choice between making interfaces for function calls simple, but passing extra information to functions vs only taking relevant parameters as input to the functions. This is again a tradeoff between a simplified interface and specificity. The extra information is passed by reference, otherwise the choice would be easy. For example, I could make all job interfaces simple by only passing a reference to the EteSyncClientState object, but it has a lot of extra information and it hides the parameters the job actually needs.<div><br></div><div>It would be great to have opinions on these queries.</div><div><br></div><div>[0] <a href="https://invent.kde.org/sjolly/kdepim-runtime/-/tree/etesyncResource/resources/etesync">https://invent.kde.org/sjolly/kdepim-runtime/-/tree/etesyncResource/resources/etesync</a></div><div>[1] <a href="https://invent.kde.org/sjolly/kdepim-runtime/-/blob/etesyncResource/resources/etesync/etesyncresource.cpp#L181">https://invent.kde.org/sjolly/kdepim-runtime/-/blob/etesyncResource/resources/etesync/etesyncresource.cpp#L181</a><br><br>Thanks<br>-- <br>Shashwat Jolly<br>IRC: sjolly on Freenode<br><a href="http://www.thejollyblog.tech">www.thejollyblog.tech</a></div></div>