From f7387cd8d1af627e5919da371cac923bbc59ef6a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 1 Dec 2010 10:34:32 +0000 Subject: add basic support for the Trivial Database (TDB) TDB supports multiple simultaneous readers and writer *processes*, not just threads. --- lib/metropolis.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/metropolis.rb') diff --git a/lib/metropolis.rb b/lib/metropolis.rb index 3afc3ec..e9810d7 100644 --- a/lib/metropolis.rb +++ b/lib/metropolis.rb @@ -8,6 +8,7 @@ module Metropolis autoload :Gzip, 'metropolis/gzip' autoload :TC, 'metropolis/tc' autoload :Hash, 'metropolis/hash' + autoload :TDB, 'metropolis/tdb' def self.new(opts = {}) opts = opts.dup @@ -17,6 +18,10 @@ module Metropolis when 'hash' opts[:path] = uri.path if uri.path != '/' rv.extend Metropolis::Hash + when 'tdb' + opts[:path_pattern] = uri.path + opts[:query] = Rack::Utils.parse_query(uri.query) if uri.query + rv.extend Metropolis::TDB when 'tc' opts[:path_pattern] = uri.path opts[:query] = Rack::Utils.parse_query(uri.query) if uri.query -- cgit v1.2.3-24-ge0c7