npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elmerglue

v0.0.7

Published

An implementation of Amazon's Glue build on LevelDB

Downloads

10

Readme

Elmerglue

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.

NOTE: Starting with v1.0, SSL/HTTPS is no longer the default. Use --ssl to enable pre-v1.0 behaviour.

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)

CBOR protocol issues with the Java SDK

The Java AWS SDK recently changed their Kinesis client to default to the CBOR protocol, which kinesalite doesn't support – you may see an error like this:

com.amazonaws.AmazonServiceException: Unable to parse HTTP response content (Service: AmazonKinesis; Status Code: 404; Error Code: null;

You can set the AWS_CBOR_DISABLE environment variable to disable this (any value should work, eg true or 1) before invoking any of the Kinesis calls in the Java SDK.

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 🐨