|
|
|
|
|
|
| Author |
Message |
ubell@sleepycat.com *nix forums beginner
Joined: 06 Jun 2005
Posts: 49
|
Posted: Thu Feb 03, 2005 9:45 pm Post subject:
Re: Using recno as a queue; alternative for consume()?
|
|
|
Marco,
One thing you can consider is to use a queue sized big enough for
your "typical" record and then use a btree to handle records which
are too big to fit in the queue indexed by their queue record number.
If most of your record are "typical" or less in size then you get
the advantage of the queue and little contention in the btree.
You would need to have some format information in your queue
data so you can tell what the real size of the record is and if you
have to read the btree.
RECNO has relatively poor concurancy since the whole tree
must be locked on updates so that record numbers can be
maintianed in the tree.
Michael Ubell
Sleepycat Software. |
|
| Back to top |
|
 |
Marco Nicosia *nix forums beginner
Joined: 25 Feb 2005
Posts: 5
|
Posted: Wed Feb 02, 2005 12:38 am Post subject:
Using recno as a queue; alternative for consume()?
|
|
|
Hi gang,
I'm putting together an application which queues messages in the
case of a communications failure/delay. I want that queue to be
reliable in the case of failure (machine reboot, process crash,
etc) so I've been playing with Berkeley DB.
Ideally I'd use a Queue, but the messages are of variable length.
So, I've been using a Recno. Is there a better alternative?
Specifically, I want consume(). Is there a best practice to
simultaneously read (in insertion order) and delete a record from
a Recno db?
This will be a multi-treaded app (in Python, whee).
Thanks!
--
_______________________________________________________________________
Marco E. Nicosia | http://www.escape.org/~marco/ | marco@escape.org |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 4:39 am | All times are GMT
|
|
Credit Counseling | Payday Loans | Advertising | Credit Counseling | Mortgage Calculator
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|