Download Chronos

Download Chronos source and extract the archive contents:

  • the source code of the Chronos library,
  • the documentation of the API,
  • two code examples for Chronos.

License

Chronos is free software. It may be used, free of charge, for any purpose, including commercial purposes. Chronos is distributed under the terms of the MIT License, reproduced here:

Copyright © 2012-2013 LIRIS, INSA de Lyon

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.

Compile the library

To compile the Chronos library (libchronos.so), run the following command:

$ make lib

You can then start using this library for your own projects by including the following header (located in the lib directory):

#include "chr_chronos.h"

To run the application, libchronos.so must first be added to your library path. Either:

  • Copy libchronos.so to a standard library location (for example /usr/lib):
$ cp lib/libchronos.so /usr/lib
  • Or add the path to libchronos.so to your LD_LIBRARY_PATH:
$ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/lib/"

Chronos is provided with two running examples that you can refer to for your own projects.

Known issues and limitations

Data types

Chronos can only manage fixed size keys and values. Variable-sized data types are currently not supported.

Data corruption

Closing a database while cursors or tables are still opened can (and most probably will) corrupt the database.

Thread safety

Chronos is currently not thread-safe.

Common errors

Flash device access error
warning: flash device does not exist, attempt to create flash_device_path

The flash device can not be opened. This usually happens when it does not exist or Chronos does not have sufficient permissions to open it. Chronos then attempts to create a file located at this path.

Flash device creation error
error: can not create flash device flash_device_path

The flash device can not be created. This usually happens when it does not exist and Chronos does not have sufficient permissions to create it.

Persistence files access error
error: can not open persistence_folder_path/chronos.chr tables will not be saved
error: can not open persistence_folder_path/device.chr free sectors will not be saved

The persistence file used to store tables descriptions and the list of free sectors can not be opened. This usually happens when the persistence_folder_path does not exist or Chronos does not have write permissions on it.

Library path error
error while loading shared libraries: libchronos.so: cannot open shared object file: No such file or directory

The application can not find libchronos.so. The library should be moved to a standard library location, or its path added to LD_LIBRARY_PATH:

$ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:path_to_libchronos"