The Yhat Blog

machine learning, data science, engineering

Yhat meets Go

by Jess Frazelle |

If you are a regular reader here, this post is going to be a bit of a different format than what you are used to. But I promise it will be just as interesting and will include a few Top Gun references. Welcome to the first Yhat Engineering blog post!

Changes, Tupac loved them we do too.

Recently we made some large changes to the architecture that makes up our software. The main component of which was recently rewritten in Go.

I am a big fan of learning new things and was curious as to what Go had to offer . Some benefits of Go swayed us into pursuing this new route which were single binary, super fast compile times, and no messy Makefiles.

golang, go, go creature

Like working with go, websockets, and/or machine learning?
Come work with us!

I have to say, after years of using Javascript, PHP, and more recently Python, I love the efficiency and safety of a statically typed language. But I am also super impatient, so waiting for the .jar files to build in college is not something I want to do today. Go compiles in seconds. It actually makes you forget about the pain involved with compiling all other languages. But enough about selling you on Go, let me tell you how we use it.

java compile, compile, slow

Java compilation fun

First we rebuilt the main brain of our software in Go. This controls the deployment of models, health, routing, and destruction. This huge thing was actually surprisingly easy to rewrite in Go, especially considering I had never written anything in Go before. I was hooked, I wanted more. I needed an excuse to build something else in Go.

Mo Models, Mo Problems

We had a problem. A very good problem. More models were being deployed to the Yhat Cloud server, but the capacity was filling up fast and instead of scaling up the server even further we wanted to split it up into multiple, smaller servers with one load balancer. It needed to route all incoming requests to to the proper child without letting the user experience any difference in response time.


USS Yhat is the custom load balancer we built that does exactly that. Obviously written in Go, it handles not only HTTP routing but websockets as well. Currently we have 6 child servers which we call "Aircraft." Hopefully you are seeing a trend. The current aircraft are named Maverick, Goose, Hollywood, Viper , Merlin, and Iceman. You will never know this however when you access cloud because everything is routed seamlessly from your request to the correct Aircraft that houses your model.

The whole squadron!

USS Yhat is also smart. It plans for the future. If it sees there is very little space for new models on any current Aircraft it will spin up a new Aircraft Server and start deploying models there. The next callsign will be Wolfman. If we run out of Top Gun Callsigns it will be a bittersweet day but I guess the NATO phonetic alphabet will have to do.

This is how I feel about Go and USS Yhat.

thumbs up, tom cruise, maverick

Thumbs up

Internal Command Line Tools

After USS Yhat I needed another Go fix so I built a CLI for things I do day to day which includes the health of each USS Yhat Aircraft, the models it hosts, and any demo Yhat Enterprise Servers we are running. I can also run simple things like searching for a user or spin up a new Enterprise demo.

golang, go, go creature, yhat go, yhat love

After building these things and working currently on another new project, yet to be released, I have to say I love Go. Yep our relationship has hit the level where I am comfortable to say "love." So if you have yet to checkout Go, I strongly suggest you do.

Sound like fun?

If go, websockets, and command line tomfoolery sound like your idea of a good time, drop us a line at and let us know! We're hiring!

Stay tuned for more posts on Yhat Engineering. Now back to your regularly scheduled data science...

Our Products

Rodeo: a native Python editor built for doing data science on your desktop.

Download it now!

ScienceOps: deploy predictive models in production applications without IT.

Learn More

Yhat (pronounced Y-hat) provides data science solutions that let data scientists deploy and integrate predictive models into applications without IT or custom coding.