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

pohl

v1.14.0

Published

reliable distributed rpc messages via redis in simple callback-style

Downloads

19

Readme

node-pohl

Build Status

  • reliable distributed rpc messages via redis in simple callback-style
  • ES6, coverage 66%+, lightweight, scalable & fast
  • uses pub & sub, but makes sure that only a single instance actually works on the task via redlock algorithm.
  • kind of rpc library that feels like making simple callbacks except for the fact that you can make them between services and not classes
  • simplistic circuit breaker to prevent timeout waves
  • metric events
  • pauseable receiver (.pause(), .resume()) for green/blue deployment scenarios

#use case

  • image you have enterprise microservices that have to make rpc/rest/soap calls to dispatch other information during incoming requests
  • now think of the potential overhead that protocols like http can cause, you might most likely have to wait for 20-150ms overhead might depend on your infrastructure
  • there has to be a way to have a standing connection, that sends messages reliably, distributed, scalable and fast with a fixed overhead that can be calculated
  • all you need is a redis cluster/sentinel setup (works with single instance as well..), include this lib in your services and call 2 functions thats about it
  • message queuing, task locking, failovers or timeouts have been wrapped in a super simple callback-like syntax that also scales inside of your software to multiple topics and endless message/task types
  • overhead is between 3-5ms constantly
  • benchmarks hits 7500 rpc/s (full-roundtrip) on mobile i7 @ 2GHZ and Redis 3.2.1 single docker instance, with a single sender

#how to use/install

  • npm install pohl
  • check ./example/index.js for a usage example
  • run example with npm start
  • run tests with npm test (requires localhost redis with default conf)
  • run benchmark with npm run benchmark

#other