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

grapewire

v0.8.8

Published

Grapewire — MQTT client-local routing and upstream-subscriptions merger - the things you expected to be there, and nothing more

Downloads

9

Readme

Grapewire

It was called "Ratatosk", then "Ratatoskr", in-house. Now that we've extracted code for a WiP of open source, we realized there was another ratatoskr. So changed to the name that of an old pub/sub-lib based on ZMQ that I never published: "Grapewire".

MAJOR WARNING

This OSS-extraction is WiP - as long as you read this line - it's not ready for consumption. Expect a few more weeks or so more at least.

Objectives

  • Aims to do as little as possible, only what "one would expect", and just a tiny tiny tad more
  • Routes messages to topics within you application
    • The router can be used standalone without the sub-reduction management etc.
  • Upstream subscription topic reduction
    • Important - without this functionality you will receive multiple duplicates of messages as soon as you subscribe to moderately mixed topics with different wild cards
  • Does parameter extraction
    • We've switched the route-string-syntax to Express-router syntax for familiarity
  • Variable expansion
    • %c, %u is replaced with cliend_id and username, respectively, whether in publish or subscribe
  • Queues pubs and subs when disconnected. Sends pubs first.
  • Handles reconnecting
  • Currently utilizes mqtt.js as underlying transport
    • shouldn't be to hard to refactor to allow different implementations
  • Some additions that "aren't necessary"
    • You're allowed to use * instead of +, and ** instead of #
    • You're allowed to use ** in the middle of topic-patterns: MQTT doesn't support such patterns, so upstream the topic will be as wide as where the **/# first comes into play in the pattern
    • You can subscribe to "only messages that haven't been handled" - this will not generate subscribes upstream, only catch incoming messages after the regular queue when no handler has matcher or accepted them - TODO specs must change here.
    • There's a rcv function that subscribes for exactly one message. The unsubscription is handled in the router to ensure this contract.
  • Relies on Promises (async code style)
  • There is also a Kotlin-version that we use in Android - will be open sourced shortly
  • A Swift-version for iPhone is planned.