a layer over moneta for hierarchical storage
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
ChangeLog
README.rdoc
Rakefile
blackboard.gemspec

README.rdoc

BlackBoard

  • BlackBoard provides a folder-layer to moneta.

  • BlackBoard aims for quickly writing and reading data.

  • To be attached to EventMachine, for example.

Example

# Objects written to the blackboard must answer to :timestamp, since they'll expire.

class TestObject
  attr_reader :timestamp
  def initialize; @timestamp = Time.now; end
end

# A BlackBoard is created with a static structure of folders and items.

bb = BlackBoard.new :ttl => 2 do
  folder1 :name1 do
    folder1 :name1, :name2
    folder2 :name2
    folder3 :name2, :ttl => 3
  end
end

# To write an item to a folder:

obj = TestObject.new
bb.folder1.folder1.name1 = obj

# To retrieve an item from a folder

obj = bb.folder1.folder1.name1

# To retrieve all items in a folder:

items = bb.folder1
obj = items[:folder1][:name1]

Installation

Gem Installation

gem install jsvd-blackboard -s gems.github.com

Features/Problems

  • Broken #empty?

  • Unspecced Folder class since 0.4.0

Synopsis

Copyright

Author

João Duarte <jsvduarte@gmail.com>

Copyright

Copyright © 2008 jsvd

License