# ase

> gossip-like protocol to maintain a distributed network of peers

Latest version **0.1.4** (published 2013-11-17) · 0 weekly downloads

## Install

```sh
npm install ase
pnpm add ase
yarn add ase
bun add ase
```

Provides the command `asex`.

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2013-11-17 |
| First published | 2013-10-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | ramitos |
| Keywords | gossip, nodes, failure, detection, distributed, peer, network |

## Links

- npm: https://www.npmjs.com/package/ase
- Repository: https://github.com/kordon/ase
- Issues: http://github.com/kordon/ase/issues
- npm.io page: https://npm.io/package/ase

## Dependencies (7)

- [afd](https://npm.io/package/afd.md) 0.2.x
- [sha1](https://npm.io/package/sha1.md) 1.1.x
- [request](https://npm.io/package/request.md) 2.27.x
- [longjohn](https://npm.io/package/longjohn.md) 0.2.x
- [json-body](https://npm.io/package/json-body.md) 0.0.x
- [propagate](https://npm.io/package/propagate.md) 0.2.x
- [component-type](https://npm.io/package/component-type.md) git://github.com/component/type.git

## Recent versions

- 0.1.4 (latest) — 2013-11-17
- 0.1.3 — 2013-10-22
- 0.1.2 — 2013-10-06
- 0.1.1 — 2013-10-05
- 0.0.1 — 2013-10-02

## README

# ase 

[![NPM version](https://badge.fury.io/js/ase.png)](http://badge.fury.io/js/ase)
[![Build Status](https://secure.travis-ci.org/kordon/ase.png)](http://travis-ci.org/kordon/ase)
[![Dependency Status](https://gemnasium.com/kordon/ase.png)](https://gemnasium.com/kordon/ase)
[![Coverage Status](https://coveralls.io/repos/kordon/ase/badge.png?branch=master)](https://coveralls.io/r/kordon/ase?branch=master)
[![Code Climate](https://codeclimate.com/github/kordon/ase.png)](https://codeclimate.com/github/kordon/ase)
[![Technical debt analysis](https://www.sidekickjs.com/r/kordon/ase/status_badge.svg)](https://www.sidekickjs.com/r/kordon/ase)

**ase** implements a gossip-like protocol with failure detection

## install

```bash
$ npm install ase
```

## example

```js
var ase = require('./')

var peer1 = ase(function (e) {
  if(e) throw e
  console.log('%s is listening', peer1.name)

  var peer2 = ase([peer1.name])

  setTimeout(function () {
    peer2.stop()
  }, 4000)

  setTimeout(function () {
    peer2.start()
  }, 8000)
})

peer1.on('new', function (peer) {
  console.log('new peer found in the network: %s', peer.name())
})

peer1.on('alive', function (peer) {
  console.log('%s was dead but it\'s now alive', peer.name())
  process.exit()
})

peer1.on('failed', function (peer) {
  console.log('%s just failed', peer.name())
})
```

### cli example

```sh
$ node bin/example.js
192.168.1.14:53873 started
```
```sh
$ node bin/example.js --seeds=192.168.1.14:53873
192.168.1.14:53888 started
Found: 192.168.1.14:53873
```
```sh
$ node bin/example.js --seeds=192.168.1.14:53873
192.168.1.14:53897 started
Found: 192.168.1.14:53873
Found: 192.168.1.14:53888
```

## license

 * Original [bpot/node-gossip](https://github.com/bpot/node-gossip) code is under the [MIT license](license/bpot)
 * Updates from [kordon/ase](https://github.com/kordon/ase) are under the [MIT license](license/kordon)

---
_Source: https://npm.io/package/ase · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
