AWS Beanstalk Worker with Node.js and SQS

First I created a project for the node.js worker. The first steps for this are identical to that of creating the Hapi.js site that publishes messages to the queue. Go through these three steps for the worker and then I’ll continue from there.

  1. First create the web application which will act as our worker service. I gave mine the name of testing-aws-sqs-worker, the site publishing to the queue I called testing-aws-sqs-site.
  2. Next add dependencies needed, like mocha.
  3. Finally make sure the AWS environment variables are set appropriately.

…and now on to the security, configuration and worker specific parts of this series…

Continue reading

Setting up a Hapi.js App that sends work to a Node.js AWS Worker via SQS


First I created a project for the node.js web application.

$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sane defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install &pkg& --save` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
name: (testing-aws-sqs-site)
version: (0.0.0) 0.0.1
description: This project that will feed data to the queue for the AWS SQS sample.
entry point: (index.js) server.js
test command: mocha
git repository: (https://github.com/Adron/testing-aws-sqs-site.git)
keywords: aws, sqs, elastic, elastic beanstalk, queue, worker
author: Adron Hall
license: (ISC) Apache 2.0

Continue reading

Setting up an AWS SQS Queue for Use With Node.js Beanstalk Worker Instances

Before diving straight in, I’m going to outline the specific goals and what I am using to accomplish these goals. The goal is to have a simple web application, that will get some element of data posted to a queue. The queue will then have data that a worker service needs to then process. As I step through each of these requirements I’ll determine the actual push and pull mechanisms that will get the job done.

Continue reading

Top 4: “Nobody Reads Blogs… Except Everybody Read Blogs”

I know I know, the marketers say it’s all about the single articles now. Nobody reads blogs. Nobody subscribes to blogs. Ya know, except of course for that small percentage of people that do.

…marketing, it’ll make you insane if you’re not careful.

Blog

But seriously, here’s a few blogs that are actually worth reading. They’re worth subscribing to and surprisingly, they’re blogs that businesses organize and write. Yes, I have and might be writing for some of them in the future. But I’m honestly basing this list on a few specific criteria:

  • The blog has to include some technical content that is important to getting kick started with their product and getting kick started with other tooling around their space.
  • The blog has to include articles that have industry information that is relevant to conferences, meetups, and other community related activities.

Here’s my list of reads lately:

Continue reading

BDD Style Test Phrasing… What’s Your Poison?

I’ve had this question come up a few times recently, and I wanted to get everybody’s take on it…  when you write BDD style tests, what practice do you prefer?

…I’ll have a follow up to this poll in a few days and explain some of my own reasoning to the whole situation.

Bashit… Just a Custom Bash Prompt Setup for Git

I use git. I’m honestly shocked when someone doesn’t use git (or at least some DVCS) these days. It just seems somewhat draconian to use any of the legacy source control systems (albeit there are some rare exceptions, like game development graphics collateral). I was reminded of something by the great hands on session that Pamela Ocampo @pmocampo and Rachel @raychatter gave at OS Bridge titled “NerdCred++; How to Customize your Bash Prompt“.

After the session I dug into customizing my bash prompt. After doing a lot of manual editing I ended up just forking and implementing Michael Gonderman’s (@magicmonty) bash-git-prompt. The way to get this installed is pretty simple, albeit it does include a few steps (and yes, the README.md basically has the instructions, but I’ve copied them here just to discuss and for ease of readability). Another key points of reference include Sebastian Celis’s (@scelis) “A zsh prompt for git users” on his blog.

Continue reading

Getting in Some Code Stylings, Looking Good for the Code Dance

In every language there are opinions about how to format code. With JavaScript, the community abounds with opinions about how the code should look, how variables are declared, whether there should be semi-colons to end each statement, spaces before or after parenthesis, and more than I care to list in a simply worded paragraph like this. Recently the team at Deconstructed sat down to determine what our ongoing code style format would be and how we can enforce it.

The first thing we did was figure out what we could use for enforcement of the coding style. Milan (@milanloveless) quickly discovered node-jscs per suggestion from Adam Ulvi (@s5fs). He implemented that code as follows.

Continue reading