473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Berkely DB – many writers, many readers



I need to now option I open the Berkley DB (both db and env) to have
configuration for multiple writers and multiple readers. Via multiple
processes and multiple threads. No trx needed.

A.
Jul 21 '05 #1
2 1715
Andy Leszczynski wrote:

I need to now option I open the Berkley DB (both db and env) to have
configuration for multiple writers and multiple readers. Via multiple
processes and multiple threads. No trx needed.


the simple answer is you can't. bdbm is probably single writer multiple
reader. I believe if you use of the the most recent sleepy cat
database, you have support for multiple readers and writers in any context.

when I did this, I stuck my gdbm database into a multithreaded
stand-alone process. I used XML RPC for access and used a per key
locking mechanism internal to the data storage and retrieval process.
This locking mechanism set appropriate locks so that a writer for
specific key would wait for all readers of that key to finish, and block
all subsequent readers until it was done.

so far is working pretty well but I haven't tried it in a high load
situation.

---eric

Jul 21 '05 #2
Eric S. Johansson wrote:
Andy Leszczynski wrote:

I need to now option I open the Berkley DB (both db and env) to have
configuration for multiple writers and multiple readers. Via multiple
processes and multiple threads. No trx needed.

the simple answer is you can't. bdbm is probably single writer multiple
reader. I believe if you use of the the most recent sleepy cat
database, you have support for multiple readers and writers in any context.

[...]

I have learned later that you can, just use Concurrent DB poruct
(db.DB_INIT_CDB):

....envflags=db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_T HREAD|db.DB_INIT_CDB
....env.open(file,envflags)

A.
Aug 7 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: M.Kumar | last post by:
Hi, We are looking for good technical writers on C++/VC++ topics. The materials can include tips/tutorials/advanced articles/project etc., Each materials can be paid upto a maximum of $15...
2
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. Has anyone used Access to keep track with reader/writer magnetic encoders? I have purchased a Fargo Printer that does...
1
by: lakshmi | last post by:
Hi all, I recently rewrote a data intensive C++ program in C#. The C++ program was traversing 3 recordsets that were all open at the same time. I replaced those 3 recordsets with 3 .NET data...
3
by: | last post by:
Can any one who has written an manuscript for CUJ please share your experiences? In particular I'd like to hear from you if your manuscript was rejected for some reason rather than being...
3
by: Trimtrom | last post by:
Hello I am learning VB.NET and was toying with the idea of embellishing my database program with Crystal Reports to provide some data reporting facilities. I was put off by the cost of...
0
by: Scott Abel | last post by:
Tony Self of HyperWrite presents an interesting and informative article entitled "Semantic, Structured Authoring: The Challenge for Technical Writers" that is sure to be of use to many technical...
7
by: bissatch | last post by:
Hi, I ocasionally use display: none; to hide divs that, on the click of a link they will reappear. For example, maybe I create a menu and when you click a link of menu options the submenu...
3
by: lazy | last post by:
I have a berkely db and Im using the bsddb module to access it. The Db is quite huge (anywhere from 2-30GB). I want to iterate over the keys serially. I tried using something basic like for key...
0
by: koti688 | last post by:
Hi Mates, Can u Please tell me how to connect to Berkely Db using Perl . I have two files , i need to access these file using perl. These files with .db extension contains Keys and its...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.