Close

BeagleLogic server goes Go

A project log for BeagleLogic Standalone

BeagleLogic, now as a turnkey and standalone 16-channel Logic Analyzer

kumar-abhishekKumar, Abhishek 10/14/2017 at 16:140 Comments

I posted about how BeagleLogic could now be used via the TCP backend. It involved writing a TCP server in NodeJS that ran on the BeagleBoard hardware (BeagleLogic standalone / BeagleBone(s)) .

However I soon realized that the NodeJS was a memory hog. After doing two large captures (100Msamples) with the BeagleLogic, I was left with < 50MB of free memory on the board! A few more captures and I was certain the board would have crashed. This wasn't going to be good.

I saw on my Twitter feed that someone had tweeted that "writing servers in Go is a pleasure". Well I had to write a server and fast. So I decided to write a prototype in Go and it was rolling in a few hours. I started in the afternoon, and by the evening I had data streaming out of BeagleLogic in Go. The memory footprint? A few MB, which was a significant improvement compared to the NodeJS counterpart. The best part? There's no difference to the end user, it's totally invisible.

Here's the code on GitHub in case you are interested to take a look.

Will I write more code in Go? I found the language interesting, even though I was writing this on a very tight schedule and had just a few moments to learn the language. I might write more code in Go, but I guess this would be all for now.

Discussions