VulCode

Go: what we build with it and why

We pick Go for services that run on many machines and should never need attention: node agents, telemetry, messenger servers and networked games.

All technologies

Go in real screenshots

The projects on this page on the screens from the portfolio and the case studies, each with a short description and the way to the full one.

A voice room in Plazer: the people in the call and the chat beside it

Plazer: hub and community server

WebSocket, WebRTC via pion, PostgreSQL and Redis.

A Minecraft server in the Flaem panel: resource use, the live console and players

Flaem: container daemon

A fork of Pterodactyl Wings that runs Docker containers on a node.

VPS monitoring in the Flaem panel: CPU, memory, disk and network charts

Flaem: telemetry

An in-memory sample store with several resolutions and disk checkpoints.

When Go, and when something else

A technology has to fit the place the code will run and the team that will take it over. The final choice is made in the quote, together with you.

We pick Go

Agents on client servers

The Flaem VPS agent and container daemon are single binaries with no runtime. A build for another system or processor comes from the same code by changing variables at compile time.

Services that must not hang

The context package carries a deadline through every call down the line, so the agent never waits forever on a service that has gone quiet. When the other side is down, the agent lengthens the gaps between attempts instead of flooding it with requests.

Live connections and voice

Plazer's hub and community server hold WebSocket connections and run voice calls over WebRTC with the pion library. Each connection is a light goroutine, not a separate system thread.

A server the client runs on their own hardware

Plazer's community server starts with one command from a Docker image, together with PostgreSQL and Redis. One Go program is easy to set up and update on a VPS, at home or on a local network.

Monitoring that works when the rest is down

Pharos is one Go program with an embedded SQLite database: it checks services over HTTP, TCP and TLS and runs a public status page. Monitoring must not depend on what it monitors, so it needs no separate database or services next to it.

Terraform and projects already written in Go

The Flaem Terraform provider is built on HashiCorp's official framework, which exists only in Go. The container daemon is a fork of Pterodactyl Wings and talks to Docker through its official Go client.

This is how we write it in our services

We pick something else

A panel with many screens

We write panels with forms, tables and charts in TypeScript and React. Plazer's web app talks to the Go hub through an API, and the Go services take care of data and connections.

Cryptography in the browser

Go compiled to WebAssembly carries its whole runtime along, so the module is heavy. Plazer's encryption is in Rust, which ships a light module to the browser.

Billing in a platform core

In Go a field nobody set holds its zero value, so a missing amount silently becomes zero. Flaem billing is in Rust, where a missing value has to be handled explicitly.

Supervising many processes

An unhandled panic in one goroutine ends the whole program. The router on Flaem nodes is in Elixir, because an OTP supervisor restarts only the broken part while the rest keeps running.

A bot or script that changes often

We write Discord bots and housekeeping scripts in Python. A fix goes in without a build, and discord.py has slash commands and panels ready.

A module for a hosting billing system

WHMCS, HostBill, Paymenter and Blesta load modules only in PHP. The Flaem modules for them are in PHP and talk to the platform through its API.

Go compared, point by point

Each need on a row of its own, with what each of the two columns gives you on it side by side.

NeedGoRust

An agent on thousands of machines

Simple code, fast builds
Good too, slower to start

A WebRTC server

The mature pion library
Fewer ready tools

Development by a changing team

Easy to take over
Needs experience

Billing and amounts

Zero values have to be watched by tests
A missing value handled explicitly in the type

Build time

Short even in a large project
Noticeably longer

Cryptography in the browser

A heavy module with the whole runtime
A light WebAssembly module

A Terraform provider

HashiCorp's official framework
Only unofficial libraries

Go in all our code

How many lines we have written in Go, and what part of everything we have written that is. We count the lines added in the commits of our repositories, language by language.

285,889
lines written in Go
5.3%
of all the lines we have written
13
repositories with Go code
3rd
place among 26 languages

The libraries these projects stand on

From the dependency files of our repositories. With each, one sentence on what we use it for.

Screen sharing in Plazer: a shared route map and the people in the call
An end-to-end encrypted chat in the Plazer phone app
  • pion/webrtc

    Voice and video in Plazer.

  • go-chi, coder/websocket

    The hub's HTTP and WebSocket.

  • pgx, go-redis, goose

    PostgreSQL, Redis and migrations.

  • docker/docker

    Container control on a node.

  • gRPC and protobuf

    Contracts between the core and nodes.

  • terraform-plugin-framework

    The Terraform provider.

Our changes to other people's Go projects

33 merged changes in 21 repositories. The maintainers of these projects reviewed our code and merged it into theirs.

Week by week

The languages of our changes

Other technologies, and where their code runs

Each has its own page with projects on real screens and a comparison with the alternatives.

Websites and web apps

What you see in a browser, and its back end.

Mobile apps

Native Android and iOS clients.

Desktop apps

Programs for Windows, macOS and Linux without a browser inside.

Back end and infrastructure

Cores, server agents and real-time services.

Bots and automation

Discord, scripts and monitoring.

Questions about Go

Answers about Go, our projects and the numbers on this page.

A project in Go?

Describe what you want to build. We reply within an hour and tell you plainly whether this technology is a good choice.