[haiku-development] Re: Working on Caya and Mail app for GSoC

  • From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 31 Mar 2011 12:06:54 +1300

On Thu, 31 Mar 2011 11:13:51 +1300, Truls Becken <truls.becken@xxxxxxxxx> wrote:


On Wed, Mar 30, 2011 at 03:26, Clemens wrote:

are we still taking about mapping local contacts to contacts on the server?
If yes there is no clean and elegant way to handle this with a userland
server. You always have to watch the filesystem for local changes and if the local server is not running you don't know whats going on locally and its
very difficult to decide what to do on the next sync.

My reaction to the above was; isn't this problem solvable? What if it
was possible to tell the system that you wanted it to not only deliver
live filesystem notifications, but also record the changes until you
ack them?

When a server starts up, it can pull all the undelivered
notifications, solving the issue about not listening 24/7.


yes such a log could solve the problem but it have to be an atomic fs operation otherwise you get out of sync when you crash during a file operation. A log is actually needed for a proper index server implementation too. You could reverse engineer what the user wanted using a log but its very complicated and error prone IMHO. You have to handle to many side cases and for each protocol it is a bit different.

I'm not saying that this is in any way better than introducing a new
FS. Just throwing the idea out there. It avoids complications you
might have about when and where to mount the FS. On the other hand,
the notification queue could grow unacceptably large if applications
register for acked notifications and then never come back to fetch the
backlog.


Don't know if a backlog is a problem maybe a index server can empty it from time to time...

The advantage of a virtual FS is that you have more control over the files. For example, I really got scared when I thought about implementing moving mails from one mailbox folder to another, so much can go wrong here! Doing this in a file system looks pretty easy, though. Furthermore, a FS could prevent the user to do not allowed operations.

For an index server it is different you just want to extract the last modifications of a file you are not interested in how the file is created. As long as the server is able to stay in sync it is perfectly fine to run it as a normal user-space server.

cheers,
        Clemens

Other related posts: