SafetyCulture has a microservice architecture deployed on Kubernetes (AWS EKS). When we started this architecture all our services were written, predominantly, in Node.js.

In the early days of our product, Node.js was great; it allowed teams to build services quickly and share a lot of common libraries. Data structures were stored as JSON, and Frontend/Backend development could all be done in a common language: JavaScript.

As time passed, our codebase grew, as well as our Engineering team. Cracks started to appear under the fast-paced growth of the company, product and our microservices. …


“gRPC-Web clients connect to gRPC services via a special gateway proxy: the current version of the library uses Envoy by default, in which gRPC-Web support is built-in.” — official gRPC-Web docs.

For production we can just enable the envoy.grpc_web filter and we are good to go.

But for development I wanted to create a gRPC server that engineers could install via a single binary and not have to run anything extra (like envoy running in docker).

gRPC-Web Wrapper

Prior to the release of the official gRPC-Web implementation the good guys at Improbable Engineering had created their own version of gRPC-Web; they also…


One of the huge benefits of using gRPC is the ability to autogenerate our client and server stubs from the protocol buffer definitions.

In the same way, we can we generate our own code by building a plugin for the protocol buffer compiler (protoc).

The plugin we’re creating is going to auto-generate gRPC response messages so that we can build a mock gRPC server in Go (Golang).

Based on original artwork from Renee French

Goal

Given the following proto file:

service MyService {
rpc Get(Request) returns (Response) {}
}
message Request {}message Response {
string id = 1;
}

We want to be able to generate something…


Tech talk for Sydney University Computing Society (SYNCS)

Presentation slides

Presentation slides are available here.


Logo from graph-gophers

In the beginning: Apollo Server

When it comes to building a graphQL server, almost everyone looks to Apollo Server; we were no different. Apollo allowed us to get a graphQL server up and running really quickly. We loved being able to return mock data almost instantly to our mobile/frontend engineers.

Our graphQL server began to grow

At SafetyCulture we have a microservice architecture, so our graphQL server only orchestrates data to our resolvers; no business logic here. However, our graphQL schema grew and grew and became hard to manage.

Magic strings

Most graphQL examples use ES2015 template literals to define the schema, but over time this get hard to read and refactor.

//…


Welcome gifts are not the norm in the world of Airbnb and, as a host, there’s definitely no expectation that you leave one. Of course, this is exactly what makes a welcome gift such a powerful gesture and strong predictor of a glowing review: it creates a wonderful first impression.

SURPRISE SCIENCE TIME! (Because there’s no better way to back up our advice than with facts)

Let’s take a speedy but informative look at the science of first impressions. As human beings, we take only a matter of milliseconds to form a first impression. Interestingly, despite this high speed decision…

Roger Chapman

Software Engineer helping teams build scalable microservices in Go and gRPC

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store