Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
lib
public
scripts
test
views
.gitignore
.rvmrc
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
app.rb
config.ru

README.md

Karelo

Description

Karelo is a simple file system-backed key/value store that was developed at Karabunga for Defensio. Each stored document maps to a file, making Karelo extremely easy to use and extend. Files can be nested in as many directory levels as you want, allowing semi-complex data structures.

It was built with basic archiving in mind and has served this purpose extremely well for us.

Usage

To create a file in Karelo, POST to http://localhost/path/to/file.txt.

To retrieve the file, GET http://localhost/path/to/file.txt.

You can browse and retrieve data from Karelo through a web browser or programatically. You may request data in JSON or plain text format by setting the Accept HTTP header to "application/json" or "text/plain". You may also pass format=json or format=raw in the query string to override the Accept HTTP header.

Karelo also comes with a simple web interface for browsing its data. It can be found at http://localhost/browse .

Requirements

  • Ruby 1.9.2 or 1.9.3
  • Sinatra
  • Bundler
  • a Rack server such as Thin, Mongrel, Unicorn or Passenger
  • Optional: Beanstalkd, for write-intensive environments

Configuration

See config/config.yml.example for an example.

Security

There is none. Make sure you place Karelo behind a firewall. Password-protecting the application is also a good idea. Nginx or Apache allow you to do that quite easily.

Importing a Beanstalkd Queue

For speed, you may create documents in Karelo through Beanstalkd. To do so, put a job in a tube with the following format:

/path/to/file.xml
This line will be stored remotely.
This line as well.
The first line represents the path of the remote file and will not be saved.

The import-queue script located in the scripts directory monitors the tube and writes everything to disk.

License

Karelo is released under the MIT License.

Copyright

Copyright (c) Carl Mercier 2008-2011

Something went wrong with that request. Please try again.