<commit_before># alldata-peer-server-http

_Stability: 1 - [Experimental](https://github.com/tristanls/stability-index#stability-1---experimental)_

[![NPM version](https://badge.fury.io/js/alldata-peer-server-http.png)](http://npmjs.org/package/alldata-peer-server-http)

Peer Server HTTP module for [AllData](https://github.com/tristanls/alldata), a distributed master-less write-once immutable event store database implementing "All Data" part of [Lambda Architecture](http://www.slideshare.net/nathanmarz/runaway-complexity-in-big-data-and-a-plan-to-stop-it).

## Usage

```javascript
var AllDataPeerServer = require('alldata-peer-server-http');
var allDataPeerServer = new AllDataPeerServer({
    hostname: 'localhost',
    port: 8080
});

allDataPeerServer.on('_put', function (key, event, callback) {
    console.log('received request to _put: ' + key + ' ' + event);
    // process the _put
    callback(); // indicate success
});<commit_msg>'append-only' is a better description than 'write-once'.<commit_after># alldata-peer-server-http

_Stability: 1 - [Experimental](https://github.com/tristanls/stability-index#stability-1---experimental)_

[![NPM version](https://badge.fury.io/js/alldata-peer-server-http.png)](http://npmjs.org/package/alldata-peer-server-http)

Peer Server HTTP module for [AllData](https://github.com/tristanls/alldata), a distributed master-less append-only immutable event store database implementing "All Data" part of [Lambda Architecture](http://www.slideshare.net/nathanmarz/runaway-complexity-in-big-data-and-a-plan-to-stop-it).

## Usage

```javascript
var AllDataPeerServer = require('alldata-peer-server-http');
var allDataPeerServer = new AllDataPeerServer({
    hostname: 'localhost',
    port: 8080
});

allDataPeerServer.on('_put', function (key, event, callback) {
    console.log('received request to _put: ' + key + ' ' + event);
    // process the _put
    callback(); // indicate success
});
{'fraction_non_alphanumeric': 0.1558641975308642, 'fraction_numerical': 0.006172839506172839, 'mean_word_length': 4.788690476190476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6656438', 'n_tokens_mistral': 648, 'n_tokens_neox': 621, 'n_words': 122}