• Stars
    star
    796
  • Rank 55,987 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of Amazon's Kinesis built on LevelDB

Kinesalite

Build Status

An implementation of Amazon's Kinesis, focussed1 on correctness and performance, and built on LevelDB (well, @rvagg's awesome LevelUP to be precise).

The Kinesis equivalent of dynalite.

To read and write from Kinesis streams in Node.js, consider using the kinesis module.

Example

$ kinesalite --help

Usage: kinesalite [--port <port>] [--path <path>] [--ssl] [options]

A Kinesis http server, optionally backed by LevelDB

Options:
--help                 Display this help message and exit
--port <port>          The port to listen on (default: 4567)
--path <path>          The path to use for the LevelDB store (in-memory by default)
--ssl                  Enable SSL for the web server (default: false)
--createStreamMs <ms>  Amount of time streams stay in CREATING state (default: 500)
--deleteStreamMs <ms>  Amount of time streams stay in DELETING state (default: 500)
--updateStreamMs <ms>  Amount of time streams stay in UPDATING state (default: 500)
--shardLimit <limit>   Shard limit for error reporting (default: 10)

Report bugs at github.com/mhart/kinesalite/issues

Or programmatically:

// Returns a standard Node.js HTTP server
var kinesalite = require('kinesalite'),
    kinesaliteServer = kinesalite({path: './mydb', createStreamMs: 50})

// Listen on port 4567
kinesaliteServer.listen(4567, function(err) {
  if (err) throw err
  console.log('Kinesalite started on port 4567')
})

Once running, here's how you use the AWS SDK to connect (after configuring the SDK):

var AWS = require('aws-sdk')

var kinesis = new AWS.Kinesis({endpoint: 'http://localhost:4567'})

kinesis.listStreams(console.log.bind(console))

Or with the kinesis module (currently only works in https mode, when kinesalite is started with --ssl):

var kinesis = require('kinesis')

kinesis.listStreams({host: 'localhost', port: 4567}, console.log)

Installation

With npm do:

$ npm install -g kinesalite

Footnotes

1Hi! You're probably American (and not a New Yorker editor) if you're worried about this spelling. No worries – and no need to open a pull request – we have different spellings in the rest of the English speaking world 🐨

More Repositories

1

alpine-node

Minimal Node.js Docker Images built on Alpine Linux
Dockerfile
2,452
star
2

react-server-example

A simple example of how to do server-side rendering with React (no compilation needed)
JavaScript
1,792
star
3

aws4

Signs and prepares Node.js requests using AWS Signature Version 4
JavaScript
663
star
4

aws4fetch

A compact AWS client for modern JS environments
JavaScript
405
star
5

react-server-routing-example

An example using universal client/server routing and data in React with AWS DynamoDB
JavaScript
299
star
6

simple-relay-starter

A very simple starter for React Relay using Browserify
JavaScript
156
star
7

kinesis

A Node.js stream implementation of Amazon's Kinesis
JavaScript
149
star
8

epipebomb

Ignore EPIPE errors when stdout runs through a truncated pipe (such as `head`) in Node.js
JavaScript
63
star
9

awscred

Node.js module to resolve AWS credentials/region using env, ini files and IAM roles
JavaScript
45
star
10

gelf-stream

A node.js stream to send JS objects to a Graylog2 server (in GELF format)
JavaScript
28
star
11

StringStream

Encode and decode streams into string streams in node.js
JavaScript
27
star
12

dynamo-table

A lightweight module to map JS objects and queries to DynamoDB tables
JavaScript
24
star
13

gelfling

Create and send GELF (Graylog2) messages in node.js, including chunking
JavaScript
8
star
14

awslogger

A CLI tool to send lines from stdin to AWS CloudWatch Logs
JavaScript
7
star
15

aws2

Signs and prepares node.js http(s) requests using AWS Signature Version 2
JavaScript
6
star
16

deep_learning_glossary

Simple, opinionated explanations of various things encountered in Deep Learning
6
star
17

pdf2png-demo

A demo of Container Image Support in AWS Lambda
Go
6
star
18

test-ci-project

Shell
2
star
19

aws3

Signs and prepares node.js http(s) requests using AWS Signature Version 3
JavaScript
1
star