Go Development: Services, Agents and WebRTC

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

The projects we write in Go

Projects from the portfolio and the case studies, each with a short note on what this language does in it.

When we choose it, and when we do not

Where we use it

  1. 01

    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.

  2. 02

    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.

  3. 03

    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.

  4. 04

    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.

  5. 05

    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.

  6. 06

    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.

When we choose something else

  1. 01

    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.

  2. 02

    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.

  3. 03

    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.

  4. 04

    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.

  5. 05

    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.

  6. 06

    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 or 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.

Need Go Rust
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

The libraries these projects stand on

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

Our changes to other people's Go projects

43 changes in 25 projects. The maintainers of these projects reviewed our code and merged it into theirs.

  1. urfave/cli 24,329 stars1 change
  2. twpayne/chezmoi 22,342 stars2 changes
  3. PuerkitoBio/goquery 14,995 stars2 changes
  4. hajimehoshi/ebiten 13,647 stars3 changes
  5. fission/fission 8,950 stars1 change
  6. concourse/concourse 7,944 stars1 change
  7. dromara/carbon 5,225 stars1 change
  8. alecthomas/chroma 5,086 stars1 change
  9. olekukonko/tablewriter 4,824 stars1 change
  10. knadh/koanf 4,244 stars1 change
  11. itchyny/gojq 3,821 stars1 change
  12. versity/versitygw 3,157 stars12 changes

Frequently asked questions

Answers about Go and our projects.

How much does a back end or a service in Go cost?
A network service or integration in Go starts at PLN 999 (about EUR 220) and usually takes 2-3 days, while a platform back end starts at PLN 8,999 (about EUR 2,020) and takes 2-4 months. We give the figure for your scope in a free quote.
Why Go and not Node.js for agents?
A Go agent is one binary with no runtime. Nothing like Node has to be installed on the client's machine or kept at the right version.
Do you also fix other people's Go projects?
Yes. We have Go changes merged into ebiten, goquery, koanf, concourse and versitygw among others. The list is on the contributions page.
When Go and when Rust?
We pick Go for agents, WebRTC servers and services a changing team will develop: the code is simple and builds fast. We pick Rust for billing and for cryptography in the browser, where a missing value has to be handled explicitly in the type.
Will you take over an existing Go project?
Yes. We start with an entry audit, from PLN 799 (about EUR 179): a code review and a list of risks, then a decision on what to fix and what to leave.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.