Consuming a DynamoDB stream in the browser

At ironsource we wanted to create a serverless web application for one of our internal systems, which relies heavily on DynamoDB and Lambda. To do that we needed to consume a dynamodb stream directly from the browser without having a server mediating the communication between it and the stream. The result was this module, open sourced under MIT license at ironSource's github account Basically... Browserify this: var DynamoDBStream = require('dynamodb-stream') var aws = require('aws-sdk') var domReady = require('domready') aws.config. »

A hideous bug

Just lost a few hours of my life over this so I figured it will be a good thing to perpetuate a relatively distilled form of the problem in hopes that in the future, it will prevent me from repeating it. The problem const fs = require('fs') var callbackCalled = 0 readFile('package.json', function(err, data) { callbackCalled++ console.log(callbackCalled) if (err) { return console.error(err) } throw new Error('something went wrong in this function') }) function readFile(file, callback) { fs. »

Looks can be deceiving

lexic order !== numeric order (dah!) Don't do this: var level = require('levelup') var db = level('db') db.put(, 'somevalue1') db.put(, 'somevalue2') or this: var level = require('levelup') var db = level('db') var counter = 0 db.put(counter++, 'somevalue1') db.put(counter++, 'somevalue2') If you care about order of iteration being related to the context of the keys. I know I did... and a quick search on github demonstrates I'm not the only one too. Your »

Automate NW.js UI testing

NW.js, previously known as node-webkit is a technology that enables a whole new way of writing desktop applications using web technologies. If you are not familier with it, I strongly suggest you get acquainted, and after you do, get back to this post. Recently I ran into this nifty module called chrome-remote-interface, a Remote Debugging Protocol interface to instrument Chrome. Quite a few of the products we develop at ironSource are based on NW.js (which is based on »

New version for node-regedit

After a very very long coding session a new release for node-regedit (v2.0.0 !!!) is out. Per the 80-20 rule, 80% of the work was fun and quick. The remaining 20% was a gory nightmare spanning several days and composed of issues in unicode characters conversion between processes, codepage difference between shell and console and other super boring stuff I won't even go into because I'm trying to erase it all from my own memory. Here is a summary »