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

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 30 Mar 2011 09:03:53 +0200

Am 30.03.2011 11:16, schrieb Adrien Destugues:
People files are already somewhat borderline (no file content !); using
these files in a remote FS would feel very strange (so, that's a file
with no content, that's not stored on my hard drive... what ?) and
confusing.

How so? Why do files have to have content in the data stream? It's
just a means to store information. Think of a file as a persistent
object of information, accessible on a system level. When multiple
applications need to access the information in a synchronized fashion,
a file system is a good choice. If you require apps to use a library
to access the information, but it's still accessible via other means
(like by directly accessing the files), then you will *always* face
the issue of stuff going possibly out of sync. An FS is a neat solution.
>
A file with no data stream is ok, but a file with no data stream, that
is also actually not stored on a disk drive, but a remote entry in a
database on some server ; that's starting to feel strange for me.

You've already said that. You don't explain it any better by repeating it. :-) Something giving you a strange feeling isn't a very robust argument. I've tried to explain why in certain situations the "strange" construct might be a very useful implementation.

One nice thing about people files is it allows to sync your local
address book with your GMail contact list automagically :)

I don't know what you mean by that.
>
If we do an FS layer for jabber contacts, this means the FS is mounted
only when the jabber server is available, in order to stay in sync with
it. This means I have to be connected to the internet to get access to
these files. I think that's wrong, because I may want to look at my
contact list when offline.
A feature of GMail is to use the same contact list for jabber and mail ;
this maps well to people files and what I would like is to keep them in
sync, but I want the people file to stay on my computer, so I can use
them while I'm not connected to the internet.
Ok, a filesystem may be a way to solve that, but I think it doesn't feel
natural. I like Haiku for the simplicity, I'm able to see how things
work by just looking at the UI. And looking at people files in some
folder of my home directory, I don't expect them to be "stored" on
google's servers. This may lead to confidential information getting
online by mistake, for example. It also makes the directory behave in a
non-natural way : it will only be able to store people files/jabber
contacts, nothing else. What happens if I drag some other file in this
folder ? It can't be read-only, because I can still modify existing
files, delete and create...

I think this is going to create problems. We need a different API,
possibly in the service kit, and not exposed as a filesystem. This API
would allow syncing between apps and keeping track of changes, and
getting in touch with a server to store/get changes remotely.

You just seem reluctant to the idea for no good reasons (IMHO). That you can't see the files when you are offline is not a fact, but completely in your mind, it can be solved simply with local caching. It's an implementation detail and any network file system needs to deal with being offline anyway (queue local changes, synchronize). That's the whole point of putting the functionality into the FS - making this transparent to applications. As for moving other types of files into the people folder - why can't the FS reject that and return a meaningful error? Now, whether or not you consider it a serious drawback is a question. I think nothing prevents you from not using the feature, simply store real Person files elsewhere, along with any other type of file you wish. The People file system is still a neat idea, since it solves a serious problem. One that is way more annoying and confusing than not being able to store any type of file in the people folder.

Best regards,
-Stephan

Other related posts: