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
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 network 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:
- Licensed under the GPL, version 2.
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
to clone the osl repository by executing
git clone git://git.tuebingen.mpg.de/osl
or grab the
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
as root to install libosl, oslfsck and the man page. 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
General Public License, Version 2.
Andre Noll, email@example.com
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.2
- -h, --help
Print help and exit
Print help, including all details and hidden
options, and exit
- -V, --version
Print version and exit
- -l, --loglevel=level
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.
- -d, --database-dir=path
Full path to the database directory
Unless non-option arguments are given, all subdirectories
of "path" are considered osl tables which oslfsck will try
- -D, --dump-dir=path
Enable dump mode (default=`')
If path is non-empty, oslfsck will write a dump of all
given tables to the specified path.
- -n, --no-fsck
Disable fsck mode. (default=off)
This is mainly useful in conjunction with the --dump-dir
- -f, --force
Enable force mode (default=off)
Ignore the dirty bit when opening osl tables.
Only report problems, don't try to fix them.
Written by Andre Noll.
Report bugs to <firstname.lastname@example.org>.
Copyright © 2008-2009 Andre Noll
This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.