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

@jweb-development/butler-aws

v1.0.9

Published

This project is for processing AWS services with butler

Downloads

9

Readme

Butler

Usage

var butler = require('butler-mq');

Client

Usage

var redis_client = redis.createClient();
var limiter = require('rate-limiting')({redis_client: redis_client});
var client = butler.client(config, limiter); //limiter is optional

putMessage

Puts a message on the queue.

Arguments:

  • options: An object containing the data that will be used to put the message on the queue.

    • queue: The name of the queue the message should be place on.

    • data: The data that should be placed on the queue.

    • push: Options for the push process

      • delay: The actual delay that should be applied to the message.
      • target: The actual target the data should be pushed to. This should be an http endpoint or can be a lambda function. If a lambda function it is in the format lambda://{function_name}. Please note that the lambda function name IS case sensitive.
      • headers: An object of additional headers to include in the http request. This is only valid if the target is a url.
    • rate_limit: All rate limiting options required if passing in limiter when initalizing client.

      • max_per_second: The rate limit of how many are allowed to output a second.
      • namespace: The namespace used in redis.
  • callback

client.putMessage(options, callback)

Server

Usage

var server = butler.server(config,);

start

Starts the server with the given configuration information.

server.start();

##Description: Amazon SQS Sample Web App in Node.js using Hapi.js, the AWS SDK and other libraries.

Key Technologies:

AWS Elastic Beanstalk Worker AWS Elastic Beanstalk Worker

AWS Elastic Beanstalk is a service used to deploy and scale web application and services. In this particular example I'll be using Node.js for all the work, but other options are available such as Java, .NET, PHP, Python, Ruby and even anything you can stick in a Docker Container. Simply put, you can run whatever you need in Beanstalk and gain all the advantages of the virtualized services and scaling of the toolset.

The worker feature that I'll be using in this how-to, referred to by AWS as Worker Tiers, is setup to handle background tasks at scale. Think of things like doing database cleanup, setting action flags, events, firing triggers or simply sending an email notification. The worker tier that I'll be using, again with Node.js, will simple be there to process messages that I'll put into the queue.

AWS Simple Queue Service (SQS) AWS Simple Queue Service (SQS)

AWS Simple Queue Service, or SQS for short, is a distributed and scalable hosted queue service for storing messages that need to be reliably available between systems. By using SQS I can then create decoupled components of an application that are autonomous of each other in execution. This provides more options around scaling up or scaling down particular workloads, apps and services throughout the application ecosystem that I've built.

For more information on AWS SQS check out this video series by Evan Brown @evandbrown @ Twitter or LinkedIn @ Evan Brown.

AWS Identity and Access Management Permissions (IAM)

When setting up a worker role with Elastic Beanstalk, certain permissions need set to CloudWatch and Elastic Beanstalk can interoperate. To set the permissions an IAM Role needs to be set for the Worker Environment Tiers. For a high level view of IAM check out the AWS IAM Page. For this particular project the specific feature of IAM that is needed is the IAM Roles.