The lightweight storage library
libosl, the object storage layer, is a library for storing small to medium-sized data in relational tables. It is easy to use, lightweight, fast and portable. libosl is suitable for applications that need only a small fraction of the features a full database management system provides.
Libosl is simple:
For libosl, all data stored in the osl tables are blobs, libosl will never try to interpret the table contents.
There is no fancy query language but only a relatively simple C-API.
There’s no support for network-access and libosl only uses a very rudimentary table locking mechanism.
There are no dependencies on external libraries. An augmented version of the red-black tree implementation of the linux kernel is in included in the libosl package.
Libosl is fast:
It uses sha1 hashes for content-based addressing.
Red-black trees are used to make lookups fast.
Libosl is portable:
It is known to compile and run on Linux, MacOS, FreeBSD, NetBSD and Solaris.
Content and metadata is stored in an endian-agnostic way.
Libosl is open source:
Apart from the library itself, the package also contains simple examples and an fsck program, oslfsck, which can be used to recover from corrupted tables due to system crashes or bugs in the application or the library.
Only the source code is available for download. Use git to clone the osl repository by executing
or grab the tarball of the current tree. If you prefer to download the tarball of the latest release, select the corresponding snapshot link on the osl gitweb page
As the bare minimum, you’ll need gcc-4 and gnu make to install libosl. gengetopt is needed to build the oslfsck executable, and help2man to generate its man page.
If everything mentioned above is available on your system, type
to build the library, the oslfsck executable and the man page. Then type
as root to install libosl, oslfsck and the man page. Finally, update the library cache by running either
ldconfig # Linux, *BSD
update_dyld_shared_cache # MacOS
The default installation prefix is /usr/local. Use
make install PREFIX=/somewhere/else
to install in /somewhere/else instead.
The make targets in the web/ directory are used for web page generation and are not needed to compile, install or use libosl. In order to make these targets the following additional tools are needed:
The osl logo was created with Adobe Illustrator by Sebastian Schultheiss.
osl is open source software, licensed under the GNU General Public License, Version 2.
Email: André Noll, email@example.com, Homepage: http://people.tuebingen.mpg.de/maan/Comments and bug reports are welcome. Please provide enough info such as the version of osl you are using and relevant parts of the logs. Including the string [osl] in the subject line is also a good idea.
oslfsck - manual page for oslfsck 0.1.3
oslfsck [OPTIONS]... [table]...
Print help and exit
Print help, including all details and hidden options, and exit
Print version and exit
Set loglevel (0-6) (default=’3’)
Log messages are always written to stderr while normal output goes to stdout. Lower values mean more verbose logging.
Full path to the database directory
Unless non-option arguments are given, all subdirectories of "path" are considered osl tables which oslfsck will try to fix.
Enable dump mode (default=’’)
If path is non-empty, oslfsck will write a dump of all given tables to the specified path.
Disable fsck mode. (default=off)
This is mainly useful in conjunction with the --dump-dir option.
Enable force mode (default=off)
Ignore the dirty bit when opening osl tables.
Only report problems, don’t try to fix them. (default=off)
Written by Andre Noll.
Report bugs to <firstname.lastname@example.org>.
© 2008-2009 Andre Noll
This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.