<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Oct 8, 2017 at 9:46 AM, David Faure <span dir="ltr"><<a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On samedi 7 octobre 2017 21:22:42 CEST Mark Gaiser wrote:<br>
> Hi,<br>
><br>
> I'm about to experiment a bit with a KIO slave idea [1] I've been having<br>
> for a while.<br>
><br>
> I get how a KIO slave works, that's not an issue.<br>
><br>
> What i don't get fully is how a KIO slave with persistent storage works<br>
> (say like baloo or stash) where a KIOD/KDED module is required to read from<br>
> the storage.<br>
><br>
> How would i make a module that:<br>
> * starts on-demand and stays running for the session lifetime once it's<br>
> started. It should only stop if the session stops or if i tell it to stop.<br>
> I'm guessing this is with "X-KDE-Kded-phase" at 2, but then i still don't<br>
> get where that module is registered, how kded knows about it and - most<br>
> importantly! - what needs to be done to get KDED or KIOD to start it? Is<br>
> that some sort of spacial dbus signal?...<br>
<br>
</span>KDED/KIOD modules are plugins (.so with embedded json, installed in the right<br>
dir for kiod to find it).<br>
Take one example (for kiod: kio/src/kssld; for kded: kio/src/ioslaves/remote/<br>
kdedmodule), do the same :)<br>
<span class="gmail-"><br>
> * We have KDED and KIOD, i think i would like to use KIOD for the reduced<br>
> dependency, but is that possible with the requirements of the point above<br>
> this one?<br>
<br>
</span>KIOD is only about services started on demand.<br>
Do you really need something that starts with the user session?<br></blockquote><div><br></div><div>I think i do, but there might be another way to get the same result that i just don't know about.</div><div><br></div><div>What i want is not just some storage. The storage (the data that describes the tags and makes the connection to the files) is something you don't want to parse on every request.</div><div>Also, it could get big if you tag thousands (or millions) of files.</div><div>You want to parse that data (json file) once and keep it in memory for efficient lookup/creation/query purposes.</div><div><br></div><div>I don't really want nor need it up and running when the user logs in, but having it start up when something from that storage is requested does seem like the way to go. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-"><br>
> * For persistent storage (or session persistent like for instance the stash<br>
> plugin), what is the best way to get data from the module into the KIO<br>
> slave? DBus? Protobuf? shared memory?<br>
<br>
</span>What I don't get is: if it's only about persistent storage, i.e. on disk,<br>
why do you need a kded/kiod module? You could just use the storage from the<br>
slave, with a lock file.<br>
<span class="gmail-"><br>
> [1] At this moment it's for a KIO slave dedicated to tag support backed by<br>
> either a JSON or YAML file and does not require file monitoring at all to<br>
> work.<br>
<br>
</span>Then it seems to me you don't need a kded/kiod module.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
David Faure, <a href="mailto:faure@kde.org">faure@kde.org</a>, <a href="http://www.davidfaure.fr" rel="noreferrer" target="_blank">http://www.davidfaure.fr</a><br>
Working on KDE Frameworks 5<br>
<br>
</font></span></blockquote></div><br></div></div>