Skip to content

irjudson/bozon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bozon

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.

What It Does

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 (cid field)
  • Updates create a new version linked to the original UUID via a parent field, preserving history
  • The API responds to HTML, XML, and JSON via Rails' respond_to format negotiation

This gives each piece of content a stable identity (UUID) across updates while making each revision uniquely addressable by its content hash.

Running It

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/server

The API will be available at http://localhost:3000/bozons.

API Endpoints

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

Historical Context

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

About

Lightweight JSON REST API server — an early experiment in RESTful resource modeling (2009).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors