Leaky Go Channels

These simple go tests check the “leaky-ness” of using channels in Go. There are two methods described here; one using both a local context, and the parent context. When tests are run against both, the LeakyAsync method runs faster, but fails the leak checker as goroutines are not resolved or cleaned up. In a production system with possibly thousands of go routines being spun up, this could result in massive memory leaks and a deadlock situation in the go binary....

March 30, 2020 · 4 min · John McBride

Slack Is Always Watching ...

(Note: this is from a blog archieve dated 2019/01/21. These opinions are my own and the slack API may have changed) TLDR: The Slack API exposes endpoints for a token holder to read all public and private messages. In today’s world, violations of privacy are no surprise. Between all the leaks and data dumps, many people have accepted this as “just the world we live in”. But what if information was exposed that could be used to judge your work performance?...

January 21, 2019 · 4 min · John McBride

To Catch a Hacker - NPM Even Stream

(Note: this post is from a legacy blog dated 12/14/2018 and some content or links may have changed) A few weeks ago, this issue was opened on a popular Node NPM package called Event Stream. This package enables Node streams to be simpler and streamlines many I/O operations within Node. Regardless, this package is a key dependency for many other Node packages and has over 1 million downloads per week from NPM....

December 14, 2018 · 8 min · John McBride

Rethink-DB Cookbook

(Note: this is from an old blog archieve dating 2018/11/05. Some things with Rethink have very likely changed) RethinkDB is a JSON based, non-relational database that provides a promise oriented, Node JS backend. It integrates seamlessly with JSON type data and is a production ready option for Node infrastructures. Pre-reqs: Docker, Node, NPM This post will serve as a brief overview of RethinkDB and hopefully give you a taste of how it works and why a JSON based database might be beneficial for you and your product....

November 5, 2018 · 6 min · John McBride

Virtual machine trouble?? Try Docker!

If you are a Oregon State CS 344 student, then you’ve been told to develop exclusively on the OS1 server. Unfortunately, this server is frequently nuked by fork bombs. If you are unable to run a full CentOS virtual machine, then here is a step by step guide to getting a CentOS docker container running on your computer. This way, you can continue to work on your assignments in a similar environment to OS1 and not have to have a full virtual machine running!...

May 13, 2017 · 6 min · John McBride