ruby-tdb.git  about / heads / tags
Trivial Database bindings for Ruby
$ git log --pretty=format:'%h %s (%cs)%d'
a255fa0 Ruby tdb 0.6.4 (2020-02-21)
	(HEAD -> master, tag: v0.6.4)
ed42861 fix gemspec (2020-02-21)
0c81856 Ruby tdb 0.6.3 (2020-02-21)
dba35c5 gemspec: remove olddoc from build dependencies (2020-02-21)
6972682 doc: s/ (2020-02-21)
a355903 website: dark216 to save electricity (2020-02-21)
acf617e doc: update URLs to avoid redirects (2018-04-29)
2dbb3c2 test/test_tdb_mt.rb: fix fragile test (2018-04-29)
87f01b0 doc: switch to olddoc for the website (2015-01-14)
8ce0b52 Ruby tdb 0.6.2 - fix for Ruby 1.9.3, new mailing list (2014-10-03)
	(tag: v0.6.2)

$ git cat-file blob HEAD:README
= tdb - Trivial Database bindings for Ruby

TDB is much like other DBM implementations, except it allows concurrent
writer processes.  TDB was initially developed for Samba, but is used by
other projects as well.  These Ruby bindings allow Ruby apps to read and
write to the same databases used by Samba!

== Features

* Concurrent reader and writer processes may safely operate on the
  same file.  This is great for MRI where multi-core performance
  is easiest to achieve with processes and not threads.

* Fork-safe, you may fork and share the same TDB object in your parent
  and child processes.

* Releases the GVL for slow disk operations under Ruby 1.9 so
  other threads can run (but not other TDB operations! see Caveats below)

* Includes several {hash functions}[link:Hash_Functions.html]
  not included by upstream TDB.

== Caveats

These caveats will be addressed upstream in

* NOT native thread-safe.  Don't try accessing TDB objects from
  multiple threads at the same time.  This probably needs to be
  fixed upstream since our attempts to make it work have failed.

  However, TDB will allow other Ruby 1.9 threads to run doing non-TDB
  things just fine.

* Database size is limited to 4G, even on 64-bit systems.

* TDB should be created with an appropriate :hash_size for large databases
  or performance will suffer.

== Install

The original tdb library from the {main site}[] is
required.  Debian users can just <code>apt-get install tdb-dev</code>.
Non-Debian users: building against upstream tdb 1.2.2 and 1.2.7 are
known to be broken, so installing tdb from the latest git is

The library consists of a C extension so you'll need a C compiler
and Ruby development libraries/headers.

You may download the tarball from our
{download site}[] and run setup.rb after
unpacking it:

You may also install it via RubyGems on

  gem install tdb

If you have a tdb installation in a non-standard prefix, you
will have to use:

  gem install tdb -- --with-tdb-dir=$PFX

Or if you have a non-standard prefix that linkers normally do not search:

  gem install tdb -- --with-tdb-dir=$PFX --with-dldflags=-Wl,-rpath=$PFX/lib

You can get the latest source via git from the following locations
(these versions may not be stable):

  git:// (mirror)

You may browse the code from the web and download the latest snapshot
tarballs here:

* (gitweb)

See the HACKING guide on how to contribute and build prerelease gems
from git.

== Contact

All feedback (bug reports, user/development dicussion, patches, pull
requests) go to the mailing list:

No subscription is required to post, and HTML will be considered spam
and rejected.  Subscription is optional, you may subscribe by sending
a blank email to:

And following instructions in the confirmation email.
Similarly, you may unsubscribe by sending an email to:

Mailing list archives are available at:

For the latest on tdb releases, you may check our NEWS page (and
subscribe to our Atom feed).

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       Ruby tdb 0.6.4 (2020-02-21)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v0.6.4       Ruby tdb 0.6.4 (2020-02-21) tar.gz
v0.6.2       Ruby tdb 0.6.2 - fix for Ruby 1.9.3, new mailing list (2014-10-03) tar.gz
v0.6.1       Ruby tdb 0.6.1 - many updates (2014-02-10) tar.gz
v0.6.0       Ruby tdb 0.6.0 - many updates (2014-02-10) tar.gz
v0.5.0       Ruby tdb 0.5.0 - reusable buffer for fetch (2011-01-17) tar.gz
v0.3.0       Ruby tdb - 0.3.0 - TDB::HashFunctions for Metropolis (2010-12-13) tar.gz
v0.2.0       Ruby tdb - 0.2.0 - optional thread-safety (2010-12-07) tar.gz
v0.1.0       tdb 0.1.0 - initial release! (2010-12-01) tar.gz

# associated public inboxes:
# (number on the left is used for dev purposes)

git clone