Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binded/atomic-fs-blob-store
blob store that atomically stores blobs (e.g. no partial writes) on the local file system
https://github.com/binded/atomic-fs-blob-store
Last synced: about 4 hours ago
JSON representation
blob store that atomically stores blobs (e.g. no partial writes) on the local file system
- Host: GitHub
- URL: https://github.com/binded/atomic-fs-blob-store
- Owner: binded
- License: mit
- Created: 2016-09-21T20:42:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-22T03:45:22.000Z (about 8 years ago)
- Last Synced: 2024-10-01T09:25:36.503Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# atomic-fs-blob-store
[blob store](https://github.com/maxogden/abstract-blob-store) that atomically stores blobs (e.g. no partial writes) on the local file system.
Forked from [fs-blob-store](https://github.com/maxogden/fs-blob-store)
```sh
npm install atomic-fs-blob-store
```[![build status](http://img.shields.io/travis/blockai/atomic-fs-blob-store.svg?style=flat)](http://travis-ci.org/blockai/atomic-fs-blob-store)
[![blob-store-compatible](https://raw.githubusercontent.com/maxogden/abstract-blob-store/master/badge.png)](https://github.com/maxogden/abstract-blob-store)
## Usage
``` js
var fs = require('atomic-fs-blob-store')
var blobs = fs('some-directory')var ws = blobs.createWriteStream({
key: 'some/path/file.txt'
})ws.write('hello world\n')
ws.end(function() {
var rs = blobs.createReadStream({
key: 'some/path/file.txt'
})rs.pipe(process.stdout)
})
```## Atomicity
The original `fs-blob-store` doesn't make atomic writes which may lead
to partially written files when an error occurs or if the process
crashes.`atomic-fs-blob-store` guarantees write atomicity, which means that if
your process crashes in the middle of a write, the file won't be written
at all.Which mean that a key only starts to exist and becomes available for
reading once a write is fully completed.## License
MIT