forked from cruppstahl/upscaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
hamsterdb is a very fast lightweight embedded NoSQL database engine with support for transactions, database cursors, in-memory databases and remote network access.
License
Unknown and 2 other licenses found
Licenses found
Unknown
COPYING
GPL-2.0
COPYING.GPL2
GPL-3.0
COPYING.GPL3
zhengshuxin/hamsterdb
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
hamsterdb Embedded Storage 2.1.4 Sun Aug 11 21:20:54 CEST 2013 (C) Christoph Rupp, chris@crupp.de; 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 C/C++. It is fast, production-proven and easy to use. This release moves further into the direction of a key/value engine with modern column-store features: cache-optimized, compressed data structures, reduced I/O and even basic schema support. Variable length keys and keys with duplicates are now stored with a custom BTree memory layout, which stores a small up-front index in each node. Unlike previous versions, "extended" keys and duplicate keys are no longer stored in a separate overflow area (which required additional I/O), but in the leaf node itself. This improves performance and keeps the file size small. Also, records can now be stored in the leaf, even if they exceed the size of 8 bytes. For this, users have to specify the record size when creating a Database (using HAM_PARAM_RECORD_SIZE). It is highly recommended to set the record size if the record size is always constant. The file format of 2.1.4 is NOT compatible with 2.1.3 and will remain unstable for the next or the next two releases. Use ham_export/ham_import to upgrade the files. 2. Changes New Features * Added HAM_PARAM_RECORD_SIZE to specify a fixed record size; if it's small enough, the records are stored in the leaf and not in a separately allocated blob * Default Btree node layout for variable length keys can now store fixed length records inline if they're small enough (and if duplicate keys are disabled) * Default Btree node layout now also stores duplicate keys inline, even if they're > 8 bytes (previous versions stored duplicate keys in a separate blob, which required lots of additional I/O) * Default Btree node layout for variable length keys and duplicate keys was completely rewritten and now uses an up-front index in the node Bugfixes - none Other Changes * C++ API: Can now specify HAM_RECORD_USER_ALLOC when retrieving keys with ham_db_find * Removed HAM_DISABLE_VARIABLE_KEYS, HAM_ENABLE_EXTENDED_KEYS; they're no longer required. Introduced HAM_KEY_SIZE_UNLIMITED for unlimited/variable length keys (the default) To see a list of all changes, look in the file ChangeLog. 3. Roadmap - See https://github.com/cruppstahl/hamsterdb/wiki/Roadmap 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 - Support for logging and recovery - Support for unlimited number of parallel Transactions - Support for partial reading/writing of records - Support for network access (remote databases) via TCP/Protocol Buffers - Support for transparent AES encryption (using libcrypto) - Basic schema support for POD types (i.e. uint32, uint64, real32 etc) - Very fast database cursors - Configurable page size, cache size and index key size - Runs on Linux, Unices, Microsoft Windows and other architectures - 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 - Open source and released under the GPL 2.0 or later - Wrappers for C++, Java, .NET, Erlang, Ada and others 5. Known Issues/Bugs None. 6. Compiling 6.1 Linux, MacOS and other Unix systems 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 On Ubuntu, the following packages are required: - libdb-dev (optional) - protobuf-compiler - libprotobuf-dev - libgoogle-perftools-dev - libboost-system-dev - libboost-thread-dev - libboost-dev - (libuv needs to be installed from sources - see https://github.com/joyent/libuv) For Windows, precompiled dependencies are available here: https://github.com/cruppstahl/hamsterdb-alien 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 (the default) HAM_BIG_ENDIAN compile for big endian machines HAM_32BIT compile for 32bit (alias: WIN32) HAM_64BIT compile for 64bit (alias: WIN64, also needs WIN32) Also, if you compile for windows, you have to compile the file 'src/os_win32.cc' and ignore the file 'src/os_posix.cc'. 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.cc' or 'src/os_posix.cc'. 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. Migrating files from older versions Usually, hamsterdb releases are backwards compatible. There are some exceptions, though. In this case tools are provided to migrate the database. First, export your existing database with ham_export linked against the old version. (ham_export links statically and will NOT be confused if your system has a newer version of hamsterdb installed). Then use the newest version of ham_import to import the data into a new database. You can find ham_export and ham_import in the "tools" subdirectory. Example (ham_export of 2.1.2 was renamed to ham_export-2.1.2 to document that it's an older version): ham_export-2.1.2 input.db | ham_import --stdin output.db 12. 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). 13. Contact Author of hamsterdb Embedded Storage is Christoph Rupp Paul-Preuss-Str. 63 80995 Muenchen/Germany email: chris@crupp.de web: http://www.hamsterdb.com 14. Other Copyrights 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. The libuv library is part of the Node project: http://nodejs.org/ libuv may be distributed alone under Node's license: Copyright Joyent, Inc. and other Node contributors. All rights reserved. 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.
About
hamsterdb is a very fast lightweight embedded NoSQL database engine with support for transactions, database cursors, in-memory databases and remote network access.
Resources
License
Unknown and 2 other licenses found
Licenses found
Unknown
COPYING
GPL-2.0
COPYING.GPL2
GPL-3.0
COPYING.GPL3
Stars
Watchers
Forks
Packages 0
No packages published