Skip to content

Commit

Permalink
re up readme docs
Browse files Browse the repository at this point in the history
install / run docs were out of order
  • Loading branch information
esatterwhite committed Jan 2, 2017
1 parent 2793320 commit dbd626d
Show file tree
Hide file tree
Showing 26 changed files with 48 additions and 50 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ npm install -s skyring

## Run A Local Cluster

That is it! You have a 5 node **Skyring** cluster with a 3 node `nats` cluster behind an `nginx` proxy listening on port `8080`

### Start a nats instance
Download the [nats binary](https://github.com/nats-io/gnatsd/releases) and start it using the defaults

Expand Down Expand Up @@ -61,27 +59,15 @@ $ cd skyring
$ npm install
$ DEBUG=* node index.js
```

#### Run via Docker Compose

The Easiest way to run a small cluster is to use the included [compose files](https://github.com/esatterwhite/skyring/blob/jsdocs/compose/dev.yml). It is also a good way to see how to quickly configure a cluster

- Install [Docker Compose](https://docs.docker.com/compose/install/)

```bash
$ npm start
```

The default settings expect a minimum of 2 servers on port `3455` and `3456` respectively. Start each server in a different terminal session

```bash
# Seed node 1
$ DEBUG=skyring:* node index.js --channel:port=3455 -p 3000
```

```bash
# Seed node 2
$ DEBUG=skyring:* node index --channel:port=3456 -p 3001
$ DEBUG=skyring:* node index.js --channel:port=3456 -p 3001
```

If all goes well you should see a message like this
Expand All @@ -90,6 +76,18 @@ skyring:ring ring bootstraped [ '127.0.0.1:3455', '127.0.0.1:3456' ] +1ms
```
Thats it, you have 2 instances running w/ HTTP servers running on ports `3000` and `3001`

#### Run via Docker Compose

The Easiest way to run a small cluster is to use the included [compose files](https://github.com/esatterwhite/skyring/blob/jsdocs/compose/dev.yml). It is also a good way to see how to quickly configure a cluster

- Install [Docker Compose](https://docs.docker.com/compose/install/)

```bash
$ npm start
```
That is it! You have a 5 node **Skyring** cluster with a 3 node `nats` cluster behind an `nginx` proxy listening on port `8080`


# Timer API

A request can be issued to any active node in the cluster. If that node is not responsible for the timer in question,
Expand Down
22 changes: 11 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@


<section class="readme-section">
<article><p><img src="https://github.com/esatterwhite/skyring/raw/master/assets/skyring-inverted.png" alt="skyring"></p>
<article><p><img src="https://github.com/esatterwhite/skyring/raw/master/assets/skyring.png" alt="skyring"></p>
<p><a href="https://travis-ci.org/esatterwhite/skyring"><img src="https://img.shields.io/travis/esatterwhite/skyring.svg?style=flat-square" alt="Travis"></a>
<a href="https://www.npmjs.com/package/skyring"><img src="https://img.shields.io/npm/v/skyring.svg?style=flat-square" alt="npm"></a>
<a href="https://www.npmjs.com/package/skyring"><img src="https://img.shields.io/npm/l/skyring.svg?style=flat-square" alt="npm"></a>
Expand All @@ -99,8 +99,7 @@
</ul>
<h1>Skyring</h1><p>A distributed reliable timer service providing similar functionality to using <code>setTimeout</code>.
<code>Skyring</code> servers are clustered into a <em>hashring</em> using consistent hashing to partition timers to specific nodes in the ring. Skyring exposes a simple HTTP API That allows to you create and cancel timers. Timer execution comes in to the form of an HTTP webhook ( more transports to come )</p>
<h1>Install</h1><pre class="prettyprint source"><code>npm install -s skyring</code></pre><h2>Run A Local Cluster</h2><p>That is it! You have a 5 node <strong>Skyring</strong> cluster with a 3 node <code>nats</code> cluster behind an <code>nginx</code> proxy listening on port <code>8080</code></p>
<h3>Start a nats instance</h3><p>Download the <a href="https://github.com/nats-io/gnatsd/releases">nats binary</a> and start it using the defaults</p>
<h1>Install</h1><pre class="prettyprint source"><code>npm install -s skyring</code></pre><h2>Run A Local Cluster</h2><h3>Start a nats instance</h3><p>Download the <a href="https://github.com/nats-io/gnatsd/releases">nats binary</a> and start it using the defaults</p>
<pre class="prettyprint source lang-bash"><code>$ gnats -D -V</code></pre><p>To verify that it is working, you can <code>telnet</code> directly to the server and ping it.</p>
<pre class="prettyprint source lang-bash"><code>$ telnet localhost 42222
> ping
Expand All @@ -111,15 +110,16 @@ <h3>Start a nats instance</h3><p>Download the <a href="https://github.com/nats-i
<pre class="prettyprint source lang-bash"><code>$ git clone https://github.com/esatterwhite/skyring.git
$ cd skyring
$ npm install
$ DEBUG=* node index.js</code></pre><h4>Run via Docker Compose</h4><p>The Easiest way to run a small cluster is to use the included <a href="https://github.com/esatterwhite/skyring/blob/jsdocs/compose/dev.yml">compose files</a>. It is also a good way to see how to quickly configure a cluster</p>
<ul>
<li>Install <a href="https://docs.docker.com/compose/install/">Docker Compose</a></li>
</ul>
<pre class="prettyprint source lang-bash"><code>$ npm start</code></pre><p>The default settings expect a minimum of 2 servers on port <code>3455</code> and <code>3456</code> respectively. Start each server in a different terminal session</p>
$ DEBUG=* node index.js</code></pre><p>The default settings expect a minimum of 2 servers on port <code>3455</code> and <code>3456</code> respectively. Start each server in a different terminal session</p>
<pre class="prettyprint source lang-bash"><code># Seed node 1
$ DEBUG=skyring:* node index.js --channel:port=3455 -p 3000</code></pre><pre class="prettyprint source lang-bash"><code># Seed node 2
$ DEBUG=skyring:* node index --channel:port=3456 -p 3001</code></pre><p>If all goes well you should see a message like this</p>
$ DEBUG=skyring:* node index.js --channel:port=3456 -p 3001</code></pre><p>If all goes well you should see a message like this</p>
<pre class="prettyprint source"><code>skyring:ring ring bootstraped [ '127.0.0.1:3455', '127.0.0.1:3456' ] +1ms</code></pre><p>Thats it, you have 2 instances running w/ HTTP servers running on ports <code>3000</code> and <code>3001</code></p>
<h4>Run via Docker Compose</h4><p>The Easiest way to run a small cluster is to use the included <a href="https://github.com/esatterwhite/skyring/blob/jsdocs/compose/dev.yml">compose files</a>. It is also a good way to see how to quickly configure a cluster</p>
<ul>
<li>Install <a href="https://docs.docker.com/compose/install/">Docker Compose</a></li>
</ul>
<pre class="prettyprint source lang-bash"><code>$ npm start</code></pre><p>That is it! You have a 5 node <strong>Skyring</strong> cluster with a 3 node <code>nats</code> cluster behind an <code>nginx</code> proxy listening on port <code>8080</code></p>
<h1>Timer API</h1><p>A request can be issued to any active node in the cluster. If that node is not responsible for the timer in question,
it will forward the request directly to the node that is keeping network latency to a minimum. This makes <code>Skyring</code> very
suitable for high performance, stateless, and distributed environments.
Expand Down Expand Up @@ -196,7 +196,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down Expand Up @@ -287,4 +287,4 @@ <h4 class="modal-title">Search results</h4>


</body>
</html>
</html>
2 changes: 1 addition & 1 deletion docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_json.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_nats.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_mock.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_node.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_router.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_timer.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_callback.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_http.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_json.html
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_nats.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_server.html
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_server_mock.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_server_node.html
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_server_router.html
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:16-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_transports.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:16-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_transports_http.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:16-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_transports_timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:16-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>

on 2017-01-02T16:18:15-06:00
on 2017-01-02T16:24:53-06:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/quicksearch.html

Large diffs are not rendered by default.

0 comments on commit dbd626d

Please sign in to comment.