Re: libcrm114 ready - but can't get into sourceforge --> libcrm114 usage and the p_db's

Jaakko Hyvätti <[email protected]> Wed, 6 Jul 2011 10:08:06 +0300 (EEST)
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
The signal could be a byte in db, which the classifier checks before each 
operation.

1. Writer: write new db
2. Writer: open old db
3. Writer: rename new db to old filename
4. Writer: write signal flag to old open db filehandle.
5. Writer: close old db filehandle.
6. Reader: check flag before every operation, or every now and then.

How does this work over nfs3, nfs4 etc..?

Jaakko

On Tue, 5 Jul 2011, Eugene Crosser wrote:

> On 07/05/2011 11:23 PM, Ger Hobbelt wrote:
>
>> 4) when done with #3, the writer (the learn node) signals the readers that the
>> new version is available and they can discard and load at their leisure: both
>
> Yes, this is what I have in mind as a "guaranteed to work" fallback, if no
> "fancy" way to do the things is available. I think I can do even easier than you
> suggest: save relearned database into new file(s), rename them "as atomically as
> I can" to the old names and signal the classifier(s) to re-read/restart "when
> convenient". Until restarted, they will have the old versions of the files
> mmap()ed (and kept as orphans in the filesystem, to be removed when the
> classifiers close them). There are some race conditions but this will suffice
> for my purpose.
>
> Just want to check with Bill that this is indeed "the only right way".
>
> Eugene
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2