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

ember-deploy-ddb

v0.0.3

Published

ember-cli-deploy index-adapter for AWS DynamoDB

Downloads

2

Readme

ember-deploy-dynamodb Build Status

This is an implementation of the ember-deploy index store that uses DynamoDB with ember-deploy.

Rationale and Use Case

The default ember-deploy revision store uses redis. Redis is perfectly fine for this application. If you are running entirely on AWS, however, your options for Redis are to run your own in EC2 or the Container Service or to use Elastic Cache. Elastic Cache is not an attractive option for this application because you cannot route to Elastic Cache unless you are in the same VPC as your Elastic Cache instance. This poses a problem for some CI systems. If you prefer to run on entirely managed infrastructure then running your Redis instance is not all that attractive either.

For AWS users the best option for a publicly addressable, highly available, fully managed, persistent key value store with predictable performance is DynamoDB.

Installation

Execute the following in your ember-cli project:

npm install --save-dev ember-deploy-ddb

Configuration

To use DynamoDB as your revision storage for ember deployment you frst need to set up a DynamoDB table and GSI. The table stores the revisions along with a row that refers to the current revision. It has hash key which maps to the 'id' attribute of each row. The 'id' attribute is a string. Each row consists of the id, which is the reivision identifier, a created timestamp in milliseconds since the epoch, and the revision index.html.

The GSI is used to provide a total ordering if the reivsions by their creation time. The ordered index is required to determine which revisions are to be expired as new revisions are added. The 10 most revisions are maintained by default.

Configuration Steps

Using the AWS console or your AWS CLI of choice

  1. Select the AWS region in which you will create your revision table and make a note of it. You will need the revision code (e.g. us-west-2) to configure ember-deploy-dynamodb.
  2. Create a new DynamoDB table. Set the hash key to the 'id' String attribute. Do not set a Range Key.
  3. Create a new GSI. The GSI will use the 'manifest' String attribute as the hash key and the 'created' Number attribute as the range key. Project all attributes to the GSI.
  4. Allocate sufficient read and write capacity for your application. The read capacity required will depent on the number of request per second you anticipate on your site. The write capacity can be far lower since you need the capacity during deployment or inspection operations. A good starting point for write capacity is 10 write capacity units. A good starting point for read capacity is 1 read capacity unit for each uncache request per second you plan to handle.

Deploying Your Ember App

module.exports = {
  development: {
    buildEnv: 'development',
    store: {
      type: 'dynamodb',
      accessKeyId: process.env['AWS_ACCESS_KEY'],
      secretAccessKey: process.env['AWS_SECRET_KEY'],
      region: '<your-aws-region-code>',
      table: '<your-table-name>',
      index: '<your-gsi-name>'
    }
  }
};