<commit_before># CartonDb

A pure Ruby key/value data storage system where the values may
consist of simple data structures.

The primary goals of this library are simplicity of implementation
and reliable, predicatble behavior when used as intended, along
with documentation making it reasonably clear what is intended.

## Uses

Uses for this gem seem pretty limited, but you might have a
purpose for it that the author has not thought about.

This is a formalization of a solution that was created to solve
a specific problem. The problem was adding a feature to a
Ruby program running on Heroku to collect data into a map of
sets of elements that would be too large to be effectively
handled in memory. The application didn't already have any use
for a relational database server, and I didn't want to add one
just for this requirement. A redis db with sufficient capacity
would have been expensive, and solutions such as SQLite are
specifically not supported by Heroku so people don't mistakenly
expect the data to be preserved. Ruby's `DBM` and `SDMB` proved
to be too unpredicatable and flakey to be practical solutions.

Although this tool was initially developed to store transient
data for use within a single process invocation and then
discarded, it is also quite well suited for long term data
storage on a system that preserves filesystem data over time.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'carton_db'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install carton_db

## Characteristics

Each database has a name which is the path of a directory in the<commit_msg>Tweaks to README<commit_after># CartonDb

A pure Ruby key/value data storage system where the values may
consist of simple data structures.

The primary goals of this library are simplicity of implementation
and reliable, predicatble behavior when used as intended, along
with documentation making it reasonably clear what is intended.

## Uses

Uses for this gem seem pretty limited, but you might have a
purpose for it that the author has not thought about.

This is a formalization of a solution that was created to solve
a specific problem. The problem was adding a feature to a
Ruby program running on Heroku to collect data into a map of
sets of elements that would be too large to be effectively
handled in memory. The application didn't already have any use
for a relational database server, and I didn't want to add one
just for this requirement. A redis db with sufficient capacity
would have been expensive, and solutions such as SQLite are
specifically not supported by Heroku so people don't mistakenly
expect the data to be preserved. Ruby's `PStore`, `DBM` and
`SDMB` each proved to be too unpredicatable and flakey to be
practical solutions.

Although this tool was initially developed to store transient
data for use within a single process invocation and then
discarded, it is also well suited for long term data storage on a
system that retains filesystem contents.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'carton_db'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install carton_db

## Characteristics

Each database has a name which is the path of a directory in the
{'fraction_non_alphanumeric': 0.03, 'fraction_numerical': 0.0, 'mean_word_length': 4.4292763157894735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1930475', 'n_tokens_mistral': 839, 'n_tokens_neox': 787, 'n_words': 530}