Lena Icon

Hi, I'm Lena! I'm a Software Engineer in California. Working at Culture Amp as a Backend Engineer.

Latest Work

Vending Machine Network

My engineering capstone project at UCSC is building a connected vending machine. The “vending machine” part isn’t that important to what I want to talk about here. I want to focus on my approach to designing and implementing a scalable IoT service.

tech stack

The basis of this whole thing will be fastify, a really fast web framework that I have been enjoying. One of its main selling points is how bare bones it is. You can pull in functionality via plugins exactly when you need it.

The IoT component will be MQTT, a standard in IoT for good reason. The publisher/subscriber model is great for managing many devices that may disconnect or drop messages. I used oracle mosquitto, since it’s pretty easy to setup and I wanted to use a self hosted broker.

The front end is a static web app powered by Vue.

I have this all running in AWS, which is my go to when standing up a web service. The only AWS exclusive tool I am using is DynamoDB, but you could switch it out with MongoDB without too much work.

The only big structural change needed now would be putting everything behind a proxy. Once that is in place, this whole thing is highly scalable and pretty damn fast.

Fastify MQTT plugin

A small plugin for fastify that allows you to share the same MQTT connection in all parts of your server.

Published on npm, you can use it in your fastify project with

npm i fastify-mqtt

TensorFlow Lite experiments

I had a lab assignment in an embedded systems class that I thought was a good opportunity to check out TF Lite.

Given some sample of voltage, determine the frequency of a sine wave signal.

I started by exploring the data measured by my microcontroller and generating some sine waves with gaussian noise. This let me create thousands of training samples very quick.


I tried out a few different models, and I found that adding more dense layers helped with prediction accuracy, but was very expensive in terms of model size. Ultimately, I went with two dense layers with 32 neurons each.

Looking at some tests runs, we can see that the model performs reasonably well.


To prepare the model for an embedded deployment, I convert it to a Lite model (250kb → 40kb) and quantize it (40kb → 10kb). Even at 4% the size, the new model performs well.

lite predictions

Big data in the browser (NVIDIA)

Over the summer of 2021, I interned on the NVIDIA Rapids Data Viz team. My favorite thing I made over there was a simple website that lets you interact with a dataset stored on the GPU. While things like deck.gl have let you leverage the GPU from the browser for a while now, we enabled the use of CUDA data structures straight from the browser. This means we can work with billions of points at once. The video above shows this on a graph with so many edges you can’t even see the background.

Get In Touch!

The best way to get in touch is to send me an email at web@lena.dev. Here's my Github and Linkedin.