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

kimbu

v0.5.1

Published

Message bus providing pub/sub and req/res style of messaging over pluggable transports.

Downloads

8

Readme

kimbu

License NPM Package NPM Downloads Build Status Test Coverage Code Climate Dependency Status devDependency Status

Stories in Ready

Author: Kurt Pattyn.

Kimbu is a message bus framework that implements publish-subscribe and request-response messaging patterns. It abstracts away from the underlying message transport by using pluggable messaging transport providers. Currently, only a RabbitMQ messaging transport provider has been implemented.

Motivation

Implementing publish-subscribe and request-response messaging patterns using existing transports (e.g. AMQP, WebSockets), requires some extensive boilerplate code. Using RabbitMQ for instance, to implement a publish-subscribe messaging pattern one needs to setup a fanout exchange and bind the consumers via queues to that exchange. For the request-response style of messaging, a reply queue needs to be set up and messages must be tagged with a correlation-id and replyTo field. When messages return they must be matched to the request using the correlation-id. Although not difficult, this requires a lot of boilerplate code.

Installation

$ npm install kimbu

or

$ npm install kimbu --production

for a production only installation (no tests, documentation, ...).

Supported Node Versions

Kimbu supports Node versions 0.12 and later.
To use Kimbu with Node versions < 4.0, you must start node with the --harmony flag.

Usage

  var Client = require("kimbu").Client;
  var Transport = require("kimbu").Transport;
  var RabbitMQTransport = Transport.providers.RabbitMQTransport;

  var rmq = new RabbitMQTransport();  //use default options
  var client = new Client("client1", rmq, function(err) {
    client.on("calculator.add", function(parameters, next) {
      var result = parameters.reduce(function(prevVal, curVal) {
        return prevVal + curVal;
      });
      next(result);
    });
    client.on("buttonPushed", function(parameters, next) {
      console.log("Button %s pushed.", parameters);
      next();
    });
    client.start(function(err) {
      client.request("calculator.add", [1, 2, 3, 4, 5], function(err, reply) {
        console.log("The sum of 1, 2, 3, 4 and 5 is", reply);
      });
      client.publish("buttonPushed", "Enter");
    });
  });

Tests

Unit Tests

$ npm test

Unit Tests with Code Coverage

$ npm run test-cov

This will generate a folder coverage containing coverage information and a folder coverage/lcov-report containing an HTML report with the coverage results.

$ npm run test-ci

will create a folder coverage containing lcov formatted coverage information to be consumed by a 3rd party coverage analysis tool. This script is typically used on a continuous integration server.

Benchmarks

$ npm run benchmark

Checkstyle

Executing

$ npm run check-style

will run the jscs stylechecker against the code.

Static Code Analysis

Executing

$ npm run code-analysis

will run jshint to analyse the code.

Code Documentation

Executing

$ npm run make-docs

will run jsdoc to create documentation.

License

MIT