JavaScript Object Property Descriptors, Proxies, and Preventing Extension

Posted by & filed under JavaScript, Node.js.

Here’s a post of mine over at the Intrinsic blog: JavaScript Object Property Descriptors, Proxies, and Preventing Extension. This is an adaptation of the talk I gave at Node Summit 2018: Property Descriptors, Getters/Setters, and Proxies, Oh My!. It covers various advanced JavaScript object concepts, such as Property Descriptors, the 13 Proxy Traps, and how… Read more »

Go v1.10.3 vs Node v10.6.0 Microbenchmark

Posted by & filed under Node.js.

This post is making use of the same code from a previous benchmark: Go v1.9.1 vs Node v8.9.0 Microbenchmark. Check that out for some background and code samples if you’d like to try the same experiment. The applications are very simple. There is a global counter which increments with each incoming HTTP request. Both applications… Read more »

Recent Concerns about Node.js Security

Posted by & filed under Node.js, Security.

There’s a growing risk of maliciously crafted npm modules wreaking havoc on our Node.js applications. I wrote a post over on my employers blog entitled The Dangers of Malicious Modules which explains a lot of these dangers. For example, did you know that a module which is loaded anywhere in your application’s dependency chain can… Read more »

Twitter Plays Zork: @DemocraticZork

Posted by & filed under Game Dev, Node.js.

I just finished an early version of a Twitter Bot which generates playable Zork-like levels and post them via Twitter. Levels can be interacted with by replying to the bots tweets. You can check out the bot at @DemocraticZork on Twitter. The game itself was inspired by a recent conference I attended called Roguelike Celebration…. Read more »

Go v1.9.1 vs Node v8.9.0 Microbenchmark

Posted by & filed under Node.js.

This is a contrived microbenchmark comparing an HTTP server written in Node and Go. In both examples we have a global hit counter which increments with each request. The value is then returned to the client as JSON using simple string interpolation. This is the command we use for the benchmark: siege -b http://localhost:8000/ Node… Read more »

What have I been up to? Late 2017 Edition

Posted by & filed under Node.js, Personal.

This year I will have spoken at least 14 events including 11 meetups and 3 conferences. Teaching is a huge passion of mine but I must admit I did have a secondary goal. That goal is of course to promote and sell copies of my most recent book, Advanced Microservices! After a presentation I pick… Read more »

Is it time to replace REST with RPC?

Posted by & filed under APIs, Node.js.

Here’s an article I wrote and published on Medium (as an experiment of sorts): Is it time to replace REST with RPC? The article is based on some talks I’ve given as well as my recent areas of research. Depending on levels of engagement I might start posting there more often ;)

Refactoring a Node.js codebase using Async/Await

Posted by & filed under JavaScript, Node.js.

This week I refactored a Node project of mine from the traditional Node callback pattern to the recently available Async/Await pattern. This pattern is available without transpiling code as of Node v8.3. In this post I’ll walk you through a small example of this conversion. This particular project is by no means large; it consists… Read more »

Redis and Node Part 4/4: Lua Scripting

Posted by & filed under Node.js, NoSQL.

This is the final part in this series on using Redis with Node.js. The content of these posts is partially adapted from my book, Advanced Microservices. There is also a companion presentation, Node, Redis, and You!, which I’ve given at several meetups and a conference. The nice thing about the MULTI / EXEC commands is that they… Read more »