-
BlackBoard provides a folder-layer to moneta.
-
BlackBoard aims for quickly writing and reading data.
-
To be attached to EventMachine, for 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]
gem install jsvd-blackboard -s gems.github.com
-
Broken #empty?
-
Unspecced Folder class since 0.4.0
- Author
-
João Duarte <jsvduarte@gmail.com>
- Copyright
-
Copyright © 2008 jsvd