Skip to content

jsvd/blackboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Author

João Duarte <jsvduarte@gmail.com>

Copyright

Copyright © 2008 jsvd

About

a layer over moneta for hierarchical storage

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages