1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
| | = 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
{TDB2}[http://mid.gmane.org/201008021002.47351.rusty@rustcorp.com.au]
* 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}[http://tdb.samba.org/] 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
recommended.
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}[http://bogomips.org/ruby-tdb/files/] and run setup.rb after
unpacking it:
http://bogomips.org/ruby-tdb/files/
You may also install it via RubyGems on RubyGems.org:
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://bogomips.org/ruby-tdb.git
git://repo.or.cz/ruby-tdb.git (mirror)
You may browse the code from the web and download the latest snapshot
tarballs here:
* http://bogomips.org/ruby-tdb.git (cgit)
* http://repo.or.cz/w/ruby-tdb.git (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:
ruby-tdb-public@bogomips.org
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:
ruby-tdb-public+subscribe@bogomips.org
And following instructions in the confirmation email.
Similarly, you may unsubscribe by sending an email to:
ruby-tdb-public+unsubscribe@bogomips.org
Mailing list archives are available at:
http://bogomips.org/ruby-tdb-public/
For the latest on tdb releases, you may check our NEWS page (and
subscribe to our Atom feed).
|