view · edit · sidebar · attach · print · history

ODBA - Object DataBase Access

<< ODBA | Index | InitialSetup >>

ODBA is an unintrusive Object Cache system. It adresses the crosscutting concern of object storage by disconnecting and serializing objects into storage. All disconnected connections are replaced by instances of ODBA::Stub, thus enabling transparent object-loading.

ODBA supports:

  • transparent loading of connected objects
  • index-vectors
  • transactions
  • transparently fetches Hash-Elements without loading the entire Hash

Example

  include 'odba'

  # connect default storage manager to a relational database
  ODBA.storage.dbi = ODBA::ConnectionPool.new('DBI::pg::database', 'user', 'pw')

  class Counter
    include ODBA::Persistable
    def initialize
      @pos = 0
    end
    def up
      @pos += 1
      self.odba_store
      @pos
    end
    def down
      @pos -= 1
      self.odba_store
      @pos
    end
  end

Questions, Comments, Farts?

zdavatz at ywesee dot com

view · edit · sidebar · attach · print · history
Page last modified on June 17, 2022, at 11:29 AM