← Back to team overview

syncany-team team mailing list archive

Re: Syncany Daemon / Gui



On Friday 21 February 2014 00:26:05 Philipp Heckel wrote:
> Hi Christof,

> For example for sharing data via torrent a seeding-process is needed

> > that runs the torrent library. It would be great if plugins could hook
> > into that daemon and have a custom method run in their own thread inside
> > that daemon.

> > How do you feel about plugins being able to register tasks at the daemon
> > process which will run them?

> Yes, I think that's a good idea. However, that goes beyond what we have
> today. What this means is that some of the code would actually live outside
> the WatchOperation -- which means that the particular plugin will only work
> if it is used with the daemon, and not in regular CLI mode.

> From the top of my head, how about something like this:

> In the daemon:
>    for each plugin in used by the daemon:
>      if (plugin.daemonRequired()) {
>         plugin.startBackgroundThread(this); // this = listener
>      }
>      ...

> > It is not clear to me how signalling could be achieved in that situation
> > or even how Exceptions should be handled. Should the daemon handle them?

> Communication should be done with regular listeners between the
> WatchOperation code and the background thread. Exceptions can be wrapped in
> messages and passed along. Not very elegant, but hey ...

Since we are brainstorming already... Shouldn't the gui be a plugin
too and just register tasks in this daemon process? If that works, then
the daemon could be implemented in a generic way and it would not matter
if the plugin is a gui or not. The daemon would just provide an empty
process environment where threads can be executed.

Of course that would mean significant change to the current daemon.


()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Attachment: signature.asc
Description: This is a digitally signed message part.

Follow ups