dvfs api and toolkits

Sean Middleditch elanthis at awesomeplay.com
Mon Apr 4 20:51:17 EEST 2005


On Mon, 2005-04-04 at 17:09 +0200, nf2 wrote:
> "C" is interesting for CLI apps and more sophisticated GUI apps or 
> libraries, which use background threads for data processing (rendering,...).
> 
> For several reasons - which have already been discussed - i would expect 
> that D-VFS daemon will use "C" (with threads) internally for the 
> backends, and should provide "A","B" and "C" through a socket to the 
> clients ("A" and "C" at least).

D-VFS will provide A.  You can wrap both B and C around A, so there's no
good reason to bloat the D-VFS protocol or daemon with special support
for either B or C.

Also, don't even start trying to assume that you will get anything close
to "traditional open/read/write/close" support from D-VFS.  There are
behavioral semantics with the POSIX APIs that we simply cannot provide
without kernel support.  I'd rather just not offer POSIX-like APIs
rather than have some APIs that look like POSIX but behave slightly
differently - especially when you consider how many developers can't
even grasp the horrendous POSIX behavior to begin with.

I'd rather see everything use something like (B), where a
console-oriented API can provide its own super simplistic wrappers that
just invoke some callbacks instead of a real mainloop, which would be
useful for signal processing or what have you.

> 
> If you want to write a really portable D-VFS, which can be integrated 
> into any toolkit, it might be better to standardize a communication 
> protocol for the client->D-VFS daemon connection rather than an API... I 
> have started to code a very simple "TinyVariant" library, which could be 
> used for such a socket communication (in case D-BUS doesn't fit). I'll 
> show you soon...

A well designed C library is very easy to wrap in any language.  If we
do use D-BUS, then the services and methods and all that good stuff will
be documented and stable.  I'm still not sure that D-BUS is a good fit,
at least not the actual bus (point-to-point mode might work).  If D-BUS
isn't used, then I see no point on making the protocol a supported entry
point (essentially because you'd have to reimplement the entire raw
protocol in every wrapper, which is gross), although it will still
remain stable so that library/daemon upgrades don't break half the
system until you reboot (hint hint, gnome-vfs developers ~_^ ).
-- 
Sean Middleditch <elanthis at awesomeplay.com>




More information about the xdg mailing list