Skip to content

Perl module to support shared variables between different processes using Berkeley DB

Notifications You must be signed in to change notification settings

lbe/IPC-Share-BDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPC::Share::BDB

This distribution is a work in progress (started 12/11/11).  There will 
be more to come.

The goal of this distribution is to provide an easy means to share data 
structures between processes and threads.  It does so using objects with 
convenience methods that are tied to the BerkeleyDB hashes or recnos. This 
functionaly already exists for threads using threads::share which uses
shared memory (RAM).  This distribution may be useful in threads when 
the hash(es) and/or array(s) is too large to be stored in RAM.

Additionally, this distribution provides a queue module, similar to
threads::queue, that can be used across processes.

The data store of all objects are based upon Berkeley DB Concurrent Data
Store (CDS).  The module handles all locking needed to insure that only
a single writer is allowed at any one time.  The selection of CDS was
made to favor speed over absolutely integrity.  This means that if an
error occurs while a change is being written to the database, that the
database will be left in an uncertain state.  Given the overall stability
of BerkeleyDB code, this is unlikely, but still possible.  If absolutely
reliability is required, then one should use the BerkeleyDB directly
and make use of its Transacational Data Store (TDS) capability.

As stated above, it is the author's intent that this model be used
between processes/threads; hence "thread safe" and "fork safe" are goals
that must be achieved in order to be successful.  Care has been
taken to insure that this module achieves this functionality; however,
given the lack of precisely clear definitions for either thread or
fork safety, it is very possible that the author has not adequately
contemplated situations that may cause deadlock or race problems.
As such, the author welcomes any feedback, preferably with corrected
code to address and tests to validate, problems.



INSTALLATION

To install this module, run the following commands:

	perl Build.PL
	./Build
	./Build test
	./Build install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc IPC::Share::BDB

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=IPC::Share::BDB

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/IPC::Share::BDB

    CPAN Ratings
        http://cpanratings.perl.org/d/IPC::Share::BDB

    Search CPAN
        http://search.cpan.org/dist/IPC::Share::BDB/


LICENSE AND COPYRIGHT

Copyright (C) 2011 lbe

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

About

Perl module to support shared variables between different processes using Berkeley DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages