New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

haze-aof

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haze-aof

Append-only file storage adapter for the Haze document cache

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

haze-aof

A persistence layer for Haze, an otherwise in-memory document/object cache.

AOF stands for "append-only file". A record is appended to the AOF when a document is created, updated, or destroyed. Append-only files are cheaper to write data to than writing to random seek-points in a file.

The AOF can be loaded and processed to recreate the on-disk collection in main memory. This would be done at app startup for instance.

Your first thought might be that if the same document is updated many times, the AOF file will grow proportionally larger and will maintain older versions of documents. However, disk space is plentiful and inexpensive. Also, having older versions maintains an audit trail of sorts. We might add a rewriter at some point.

Installation

npm install haze-aof

Usage

var haze = require('haze')
var hazeAOF = require('haze-aof')

hazeAOF.load('data.aof', function (errors) {
  if (errors) {
    console.error(errors)
  } else {
    startApp()
  }
})

function startApp() {
  haze.createDocument('Things', {
    meatball: true
  })
}

Author

Brian Hammond brian@fictorial.com

License

MIT

Keywords

haze

FAQs

Package last updated on 10 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts