December 11, 2016

The New York Times has released a microservices toolkit called “Gizmo”. Gizmo has been made available as open source software. It is based on the Go programming language (Golang), and provides standardized configuration and logging, and basic interfaces to simplify development of Go services—especially APIs.

The New York Times has a blog site dedicated to code and development called “Open”. A recent post there explains how The New York Times leverages the Go programming language, and the seed from which Gizmo grew.

At The New York Times, our development teams have been adopting the Go programming language over the last three years to build better back-end services. In the past I’ve written about using Go for Elastic MapReduce streaming. I’ve also talked about using Go at GothamGo for news analysis and to improve our email and alert systems at the Golang NYC Meetup. We use Go for a wide variety of tasks, but the most common use throughout the company is for building JSON APIs.

Gizmo is comprised of four packages designed to help developers configure and build microservice APIs and pubsub daemons. The four packages are:

  • Package Config: Provides a set of common, composable elements for working with tools common to technology currently at The New York Times
  • Package Server: Provides a set of interfaces that define how a server and service should look and interact with one another. Also in charge of health checks, monitoring, logging, and providing hooks for middleware handlers and registered services.
  • Package Web: Small package that includes handy functions for parsing types from request queries and payloads.
  • Package Pubsub: Provides high-level abstraction for building publisher and subscriber services and implementations for the messaging system in use at The New York Times.

The New York Times released Gizmo as an open source project to enlist the support of the developer community to expand and refine its capabilities. As it stands, Gizmo works well for its intended purpose within The New York Times, but the developer team there would like to see broader adoption of the Go programming language and an enhanced Gizmo microservices toolkit.

JP Robinson, principal software engineer at The New York Times, expressed some concerns in a recent interview that the flexibility of Gizmo could potentially lead to chaos. “I’ve found keeping the toolkit simple yet flexible sticks to the Go way of building software and also speeds up adoption by keeping the learning curve gentle. There are many ways you could structure a Gizmo application and use it in the wild, which I think could turn into a problem without guidance.”

Robinson explained that he is working on a series of blog posts for The New York Times Open blog to provide guidance on how he believes Gizmo apps should be structured, built and tested. That guidance should give other developers a foundation and some guidelines that will hopefully help keep everyone in the same ballpark moving forward.

Tony Bradley is Community Manager for Tenable Network Security and Editor-in-Chief of TechSpective. Tony has a passion for technology and gadgets--with a focus on Microsoft and security. He also loves spending time with his family and likes to think he enjoys reading and golf even though he never finds the time for either.