[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: Need for a general purpose database in KDE (maybe kab)
From:       Rik Hemsley <rik () rikkus ! demon ! co ! uk>
Date:       1999-07-15 14:19:16
[Download RAW message or body]


On 16-Jul-99 Don Sanders wrote:
> Rik wrote:
>> Would you agree that it would be advantageous to allow for local storage
>> without a DB backend ? I think the principles seem pretty simple,
>> considering
>> what we're storing. We can make it safe by employing the same methods used
>> for storing messages in a Maildir box and even index it in the same way.
> Do you have time to elaborate on these methods? I'm interested in hearing
> more
> about them. I mean under what conditions the non-Maildir approach is unsafe,
> how
> to make it safe and about the indexing method. Perhaps a URL?

Maildir uses separate files for each item and allows you to 'cancel' a write
operation if it isn't successful. There's a discussion of locking in
kdenonbeta/empath/design_docs/locking.html

Here's a description of how to write to Maildir from man 5 maildir:

       The tmp directory is used to ensure reliable delivery,  as
       discussed here.
 
       A program delivers a mail message in six steps.  First, it
       chdir()s to the maildir directory.  Second, it stat()s the
       name  tmp/time.pid.host,  where time is the number of sec-
       onds since the beginning of 1970 GMT, pid is the program's
       process  ID,  and host is the host name.  Third, if stat()
       returned anything other than ENOENT,  the  program  sleeps
       for two seconds, updates time, and tries the stat() again,
       a limited number of times.  Fourth,  the  program  creates
       tmp/time.pid.host.  Fifth, the program NFS-writes the mes-
       sage to the file.  Sixth, the program link()s the file  to
       new/time.pid.host.   At  that instant the message has been
       successfully delivered.
 
       The delivery program is required to start a 24-hour  timer
       before creating tmp/time.pid.host, and to abort the deliv-
       ery if the timer expires.  Upon error, timeout, or  normal
       completion,  the  delivery program may attempt to unlink()
       tmp/time.pid.host.
 
       NFS-writing means (1) as usual,  checking  the  number  of
       bytes returned from each write() call; (2) calling fsync()
       and checking its return value;  (3)  calling  close()  and
       checking  its return value.  (Standard NFS implementations
       handle fsync() incorrectly but make up for it  by  abusing
       close().)

>> Or ? Just require an LDAP server to be available ? OpenLDAP springs to
>> mind.
>> 
> LDAP support and a DB backend would/will be great but I think in the here and
> now we need a PIM specific interface for accessing data like MS' CDO (did
> anyone
> look at my previous post on this? If it was unclear I'm willing to try again)
> and a non-scalable but easy to implement text file based backend.

I read it and understand it. I agree that it sounds like a good description of
what we should be doing.

I don't think we can do a text-based backend, though, unless you know how to
write human-readable 16 bit Unicode.

Cheers,
Rik


--
KDE - Colour outside the lines  : http://www.kde.org
[[without]] - software for KDE  : http://without.netpedia.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic