« Back to Blog

Introducing Heisenberg & Pinkman

by Daniel Zuzevich | Jan 21, 2019 | [[ readEstimate ]] min read


2018 has been a fast-paced year for the development team at Grafton Studio. From building and maintaining web applications, to creating powerful custom websites with CraftCMS, we seem to always have our hands in something new and exciting. In order to keep up with the growing number of clients and to ensure consistent quality on every project, it became increasingly clear that we needed to revisit how we organize our development workflow. After a few white-boarding sessions and several coffee cups later, we came to the realization that our website work was our major bottleneck, and not our web application process.

At first glance this seems surprising, but modern CMS systems have many moving parts and pose unique problems that web applications do not. Couple this together with the fact that we need to keep various environments in sync for every client we have, and the end result is the perfect recipe for a headache. However, with some quick thinking and a little ingenuity, the development team was able to bounce back and setup a process that we think will be a success far into the future for us. Therefore, I would like to use this article to introduce to you to the tools we created, and how they have helped solve the bottleneck in our website development process.

Node.js To The Rescue

If you have been involved with the software development world at all in the past few years, you would know that Node.js is an incredibly powerful platform. What peaked our initial interest was its ability to provide direct access to our machines file and networking operations through a language that we use everyday, JavaScript. We also liked that asynchronicity is baked into the platform by default, which allows developers to write code that is less resource intensive and non-blocking.

With Node.js as our clear choice, we set out to create two tools with some very interesting names. Our first tool, Heisenberg, is a command line tool that automates all of the work that it takes to keep our clients CMS projects in sync across multiple environments. The second, Pinkman, is an application that gives us peace of mind by ensuring all of our clients projects are safeguarded against data loss and downtime.

After several months of use, we couldn't be any happier with our decision. Productivity has increased significantly, and our websites division is shipping out finished products faster than we ever have before.  Without further ado, let's dive into the two tools and see what they are all about.

Heisenberg: A Node.js Command Line Tool

For fans of the popular television series Breaking Bad, you can revel in the fact that this tools name is indeed a reference to Walter Whites legendary alter ego, Heisenberg. Similar to how Heisenberg is the mastermind behind all of the important events throughout the TV series, the same is true for Heisenbergs role in our website development workflow. Sitting beneath a slick command line interface lies a significant amount of JavaScript code that handles everything from the transfer of files, installation and generation of SSH keys, imports and exports of SQL databases, temporary backups, and various other tasks

Having this command line tool takes a big chunk of the guess work out of this time consuming process, and keeps members of the development team on the same page. If there is ever a bug with the tool, or someone forgets a specific command, the documentation and error reporting is just a click away on the Heisenberg Github repository. 

We also made sure to jam pack Heisenberg with useful console output for the developer. The highly detailed and color coordinated output allows the developer to see exactly what Heisenberg is doing behind the scenes. If an error occurs at a specific point in the process, the developer will know about what happened and where it occurred. If the command executes successfully, then the developer is greeted with green checkmarks and a message notifying them the process completed successfully.

Not only is Heisenberg great for us internally, but it also provides peace of mind to our clients, who can rest peacefully at night knowing that they have a highly efficient development team backing them up.

Pinkman: The Ever Important Sidekick

What would Heisenberg be without his colorful sidekick Pinkman? While the answer to that can certainly be debated upon by fans of the show, for us however, Heisenberg and Pinkman complement each other quite nicely. While Heisenberg is making sure the whole operation is operating smoothly, Pinkman is off to the side doing his own important work, which in his case means safeguarding our clients projects.

Instead of being used directly by developers, Pinkman sits in an undisclosed location, and operates without any intervention from the development team. His job is simple:

  • Make database and file backups for all of our clients projects at certain time intervals.
  • Send these backups across various storage mediums to ensure redundancy in the backup process.
  • Run various checks on website/application health for each client, and report back to us if any issues arise.

Having Pinkman around is a big weight off of our shoulders, and gives us confidence that if something were to happen to one of our clients production environments, they would be back up again with little to no downtime, and with zero data loss. In fact, the addition of these tools has worked out so well, we never hear from Pinkman (which is a good thing). But just in case there is an internal error within Pinkman itself, we have him contact us once a week just to say "hi" via email.

What The Future Holds For Heisenberg and Pinkman

As I mentioned earlier, we could not be more pleased with the benefits that these tools provide to our team. We are quite optimistic that new additions to these tools will be quick and painless, as the codebase is designed to be highly flexible and scaleable. We had a blast working with Node.js, and hope to continue working with it not only internally, but externally as well.