forked from cruppstahl/upscaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
292 lines (222 loc) · 11.9 KB
/
README
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
hamsterdb Embedded Storage 1.1.13 Tue Aug 9 19:28:51 CEST 2011
(C) Christoph Rupp, [email protected]; http://www.hamsterdb.com
This is the README file of hamsterdb Embedded Storage.
Contents:
1. About
hamsterdb Embedded Storage is a database engine written in ANSI C. It supports
a B+Tree index structure, uses memory mapped I/O (if available), supports
fast Cursors and variable length keys and can create In-Memory Databases.
This release fixes a performance regression. When aborting a Transaction,
modified pages would be recreated from the log even if the current
Transaction was read-only. This caused a performance regression compared
to 1.1.9.
2. Changes
New Features
* none
Bugfixes
* when aborting a Transaction only re-create pages if they were modified in
the aborted Transaction
Other Changes
* none
To see a list of all changes, look in the file ChangeLog.
3. Roadmap
- This "stable" development branch is in maintenance mode. Active developments
and new features are only added to the "bleeding_edge" branch (2.0.0.rc1 and
newer) which will replace the "master" branch after going through the
current stabilization phase.
4. Features
- Very fast sorted B+Tree with variable length keys
- Can run as an in-memory database
- Supports multiple databases in one file
- Supports record number databases ("auto-increment")
- Supports duplicate keys (with sorting)
- Support for logging and recovery
- Support for Transactions (only one Transaction at a time, requires logging)
- Support for partial reading/writing of records
- Support for network access (remote databases) through http
- Very fast database cursors
- Configurable page size, cache size and index key size
- Portable ANSI-C implementation
- Runs on Linux, Unices, Microsoft Windows, Windows CE and on many
architectures (also embedded and SPARC)
- Endian-independent file format
- Uses memory mapped I/O for fast disk access (but falls back to read/write if
mmap is not available)
- Uses 64bit file pointers and supports huge files (>2 GB)
- Easy to use and well-documented
- Supports rudimentary live-reorganization by automatically
merging freelist entries
- Remote access with embeddable server
- Open source and released under the GPL 2.0 or later
- Supports AES encryption and zlib compression
- Wrappers for C++, Python, Java and .NET
5. Known Issues/Bugs
None.
6. Compiling
6.1 Linux and Cygwin/Win32
To compile hamsterdb Embedded Storage, run ./configure, make, make install.
Run `./configure --help' for more options (i.e. static/dynamic library,
build with debugging symbols etc).
6.2 Microsoft Visual Studio 8
A Solution file is provided for Microsoft Visual C++ 2005:
'win32/hamsterdb.sln'. It compiles a static and a dynamic library.
Please read the README.TXT file in the win32 directory.
All libraries can be downloaded precompiled from the hamsterdb webpage.
To download Microsoft Visual C++ 2005 Express Edition for free, go to
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx.
6.3 Dependencies
hamsterdb will compile out of the box. On Unix, however, remote functionality
will be disabled if libcurl and Google protobuf SDKs are not installed. If
you want to include remote functionality, then you have to download the
dependencies from here:
http://code.google.com/p/protobuf/
http://curl.haxx.se/libcurl/
On Ubuntu, you can install the following packages:
protobuf-compiler
libprotobuf-dev
libcurl-dev
For Windows, precompiled libcurl/protobuf libraries are available on
hamsterdb.com.
7. Testing and Example Code
Make automatically compiles several example programs in the directory
'samples'. To see hamsterdb Embedded Storage in action, just run 'samples/db1'
or any other sample. (or 'win32/out/samples/db1/db1.exe' on Windows platforms).
8. API Documentation
The header files in 'include/ham' have extensive comments. Also, a doxygen
script is available; run 'make doc' to start doxygen. The generated
documentation is also available on the hamsterdb web page.
9. Other Ways to Compile hamsterdb Embedded Storage
If you want to compile hamsterdb without using the provided ./configure
environment, you have to set some preprocessor macros:
DEBUG enable debugging output and diagnostic checks (slow!)
HAM_LITTLE_ENDIAN compile for little endian machines (i.e. x86)
HAM_BIG_ENDIAN compile for big endian machines (most other
architectures)
HAM_32BIT compile for 32bit (alias: WIN32)
HAM_64BIT compile for 64bit (alias: WIN64, also needs WIN32)
HAM_DISABLE_COMPRESSION build without support for zlib compression
HAM_DISABLE_ENCRYPTION build without support for AES encryption
HAM_ENABLE_REMOTE build with remote access (needs libcurl/protobuf)
Also, if you compile for windows, you have to compile the file 'src/os_win32.c',
and ignore the file 'src/os_posix.c'. Vice versa on non-Windows platforms.
10. Porting hamsterdb Embedded Storage
Porting hamsterdb Embedded Storage shouldn't be too difficult. All operating
system dependend functions are declared in 'src/os.h' and defined
in 'src/os_win32.c' or 'src/os_posix.c'.
Other compiler- and OS-specific macros are in 'include/ham/types.h'.
Most likely, these are the only files which have to be touched. Also see item
9) for important macros.
11. Licensing
hamsterdb Embedded Storage can be licensed on a per-developer basis for
closed source applications. For more details, see
http://hamsterdb.com/licensing and http://hamsterdb.com/store.
hamsterdb Embedded Storage is released under GPL2 or later. There are several
exceptions for other open source licenses (see
http://hamsterdb.com/licensing/exceptions for legal information and a license
list).
12. Contact
Author of hamsterdb Embedded Storage is
Christoph Rupp
Paul-Preuss-Str. 63
80995 Muenchen/Germany
email: [email protected]
web: http://www.hamsterdb.com
13. Other Copyrights
The AES library in '3rdparty/aes' is (C) Karl Malbrain, [email protected]
(http://www.geocities.com/malbrain). It has the following license:
This work, including the source code, documentation
and related data, is placed into the public domain.
The orginal author is Karl Malbrain.
THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY
OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF
MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE,
ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE
RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
The zlib library in '3rdparty/zlib' is (C) Jean-loup Gailly and Mark Adler.
It has the following license:
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
The mongoose http server in '3rdparty/mongoose' is (C) Sergey Lyubka and
Gilbert Wellisch.
It has the following license:
Copyright (c) 2004-2009 Sergey Lyubka
Portions Copyright (c) 2009 Gilbert Wellisch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The libcurl library is Copyright (c) 1996 - 2010, Daniel Stenberg,
<[email protected]>. It has the following license:
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2010, Daniel Stenberg, <[email protected]>.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization of the
copyright holder.
The Google Protocol Buffers ("protobuf") library is Copyright 2008, Google Inc.
It has the following license:
Copyright 2008, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.