Trying Out Serverless Applications at AWS — JAWS, Lambda, API Gateway

I just finished up a POC for an integration with a major retailer that allows our Customer Engagement Center to better assist customers buying custom blinds in store. It leverages AWS Lambda, AWS API Gateway and AWS SES to deliver a massively scalable, highly available web API with no servers to manage. I am really liking the tools provided by the JAWS Framework that made it far easier to manage and deploy the solution. I hope to do a full blog post on this in the near future.

Node.js Library for Delcom Visual Indicator Published

I just published my first npm package, delcom-indicator.  It’s a basic driver for the Delcom Visual Indicator.  I built it to support the node.js build light project I am currently putting together for the Raspberry Pi.  This library supports any platform that supports node-hid, which should include Windows, Mac and most Linux distributions.  It has been tested on Mac OS/X 10.9.2 and Raspian.

The publication process for node packages is a little easier than the one for .NET Nuget packages.  To get started, you need to setup an account at npm and authorize it on your computer:

npm adduser

Assuming you have a node.js project that includes packages.json in your directory, publishing is as simple as:

npm publish

Configuring a Raspberry Pi to Talk to Delcom USB With Node.js

Took a little digging, but I have Node.js 0.10.24 and Node-Hid successfully installed and talking to my Delcom USB indicator.  I wanted to take a minute to document the steps I took.  Before following the steps in this article, make sure you have your Raspberry Pi hooked up to the network.

Getting the OS Ready

Start by updating all your packages:

sudo apt-get update
sudo apt-get dist-upgrade

You will need a couple of additional packages required by node-hid, a node library used to communicate with USB HID devices like the Delcom USB Indicator:

sudo apt-get install libudev-dev libusb-1.0-0-dev

Node.js Install

As least as I write this you cannot get Node.js 0.10.x using apt-get. Instead, you have to install it yourself. Here’s the steps I used for node 0.10.24:

sudo mkdir /opt/node
tar xvzf node-v0.10.24-linux-arm-pi.tar.gz
sudo cp -r node-v0.10.24-linux-arm-pi/* /opt/node

You’ll also have to put node into your path and set NODE_JS_HOME by editing your profile. Open up the profile:

sudo nano /etc/profile

Put the following right before you see “export PATH”:


Once you reboot, you can verify the node installation by issuing the following command:

node -v

It should print out v0.10.24 on your console.

Node-Hid and Test Project

Now it’s time to create a little node project to test things out. This example will set things up in a directory called ~/nodetest:

mkdir ~/nodetest
cd ~/nodetest
npm install node-hid

You can then use nano to create a js file to execute with node:

nano test.js

Here’s the code:

var hid = require('node-hid');

var devices = hid.devices();


Once you plug in the Delcom device, you can run the app to find it as follows:

node test.js

You should see output like this:

[ { vendorId: 4037,
    productId: 45184,
    path: '0001:0005:00',
    release: 32,
    interface: 0 } ]

If you have multiple USB HID devices attached, they will appear in the list as well. The one with the vendorId given above is the Delcom device.

One More Thing

I prefer to write code on my Mac using Webstorm.  I get access to my Raspberry Pi console using ssh and transfer files with help from the netatalk AFP client installed as follows:

sudo apt-get install netatalk

My First Bite of Raspberry Pi Not So Tasty

Got home late last night, ate dinner and sat down to boot up my new Raspberry Pi. I bought it as part of a kit that included a power supply, a case and an 8GB SD card with Raspberry Pi New Out of Box Software (NOOBS) installed. Plugged it in and booted to a kernel panic that indicates a problem with the boot device. Not exactly unexpected, but certainly disappointing. Tonight I’ll reformat the card and burn the NOOBS image onto it so I can try again.  Wish me luck!

Lissome Project

Just started working on the design for the project I discussed in my last post.  I decided to call it Lissome, which means, among other things, “nimble”.  Seems like a decent name for an agile task board.   The Balsamiq mockup can be found in the Lissome repository.

I decided to license it under AGPL .  I realize this license is fussier than many other open source licenses about making source changes freely available, but that is precisely the point.

Building Something Twice (Just for Fun)

I’ve been playing with Node.js a bit lately and have been looking for something fun and useful to do with it.  Along the way, I’ve also developed a curiosity about how a well-written, non-trivial Node.js application might compare to an equally well-written .NET application in terms of features, quality and development time.  Today, I am starting a spare time project to satisfy my curiosity.

The idea is to develop an agile task board application with a highly-interactive web front end and two different fully scalable backends: the first in Node.js and the second in .NET.  My goal is to make the backends as interchangeable as possible.  My initial guess is that the only difference in how the client will communicate with the backend is in the area of server notifications, which will probable use with the Node.js backend and SignalR with the .NET backend.  For simplicity, both backends will use the same hosted NoSQL and search facilities.  I’m leanings towards RavenDB hosted by RavenHQ simply because I am familiar with it and because it includes powerful search capabilities.

The whole thing will be open source and I’ll blog about it as I progress.  I’ll start by sketching a basic UI wireframe so I can put together an initial product backlog.  Wish me luck.