Historical Project — An early experiment in RESTful resource modeling written in 2009, predating most modern REST frameworks. Preserved as a historical reference.
A lightweight Rails application providing a JSON/XML REST API server built around a content-addressable resource model. Written in 2009 when REST frameworks were still nascent, bozon explores an approach to versioned, immutable resource storage using SHA-1 content IDs and UUIDs.
Bozon exposes a standard CRUD REST API for "bozon" resources -- JSON blobs stored with automatic content addressing:
- Each resource is assigned a random UUID on creation
- Each version is fingerprinted with a SHA-1 hash of its content (
cidfield) - Updates create a new version linked to the original UUID via a
parentfield, preserving history - The API responds to HTML, XML, and JSON via Rails'
respond_toformat negotiation
This gives each piece of content a stable identity (UUID) across updates while making each revision uniquely addressable by its content hash.
Bozon is a standard Rails 2.x application (circa 2009).
# Install dependencies
gem install rails
# Set up the database
rake db:create db:migrate
# Start the server
script/serverThe API will be available at http://localhost:3000/bozons.
| Method | Path | Description |
|---|---|---|
| GET | /bozons | List all resources (JSON/XML) |
| GET | /bozons/:id | Show a single resource |
| POST | /bozons | Create a new resource |
| PUT | /bozons/:id | Update (creates a new version) |
| DELETE | /bozons/:id | Delete a resource |
In 2009 the Ruby ecosystem had Rails but lacked the lightweight REST micro-frameworks (Sinatra was brand new, Grape didn't exist yet). Bozon is a Rails scaffold augmented with content-addressable versioning -- an early exploration of immutable data patterns that would become mainstream with tools like Git-backed storage and event sourcing.
License: See repository