Programming Languages

Programming Languages

Frontend

All frontend apps are written in TypeScript (React and React Native). Tauri, which builds cross-platform webview-based desktop apps uses a bit of Rust. React Native does involve some use of native iOS (Swift) and Android (Kotlin/Java) modules.

Backend

Our backend applications are written in Typescript and Go. The decision between TypeScript and Go is up to the developers building the service. Single-threaded performance is actually fairly similar, however when taking advantage of Goroutines, performance differences are substantial, not to mention reduced memory usage in Go, which results in meaningful cost savings at scale.

When we use TypeScript for a backend service, it is generally because we need to (heavily) use a JavaScript package. As an example, the Buzzbuzz service uses jsx-email.

Language for each Backend Service

  1. Friend - Go (net/http web server plus connect-go)
  2. Tunnel - Go (Echo web server with connect-go for certain routes)
  3. Rest - Go (Echo web server)
  4. Visa - Go (Echo web server)
  5. Dealer - Go
  6. Pilot - Go (gobwas/ws for websockets)
  7. Blockhead - Go (gRPC API via connect-go, runs yjs via v8go)
  8. Facebox - Go (gRPC API via connect-go)
  9. Wallstreet - Go (gRPC API via connect-go with stripe-go)
  10. Messenger - Go (gRPC API via connect-go)
  11. Blobby - Go (gRPC API via connect-go)
  12. Buzzbuzz - TS on Node (uses jsx-email and tailwindcss for creating emails as well as expo-server-sdk for push notifications so it is convenient to use TS)
  13. Quest - Go (gRPC API via connect-go, interacts with Turbopuffer via its SDK/API)
  14. Asimov - Go (gRPC API via connect-go with go-openai)
  15. Stagehand - Go (gRPC API via connect-go)
  16. Flipt - Go (developed by a seperate company, we just use their Docker image)
  17. NATS - Go (developed by a seperate company, we just use their Docker image)

Each Go service that uses Postgres uses Ent as an ORM and Atlas as the migrations engine. TypeScript services use Drizzle (just Buzzbuzz).

Other Languages

We only introduce an additional language if necessary, so it is best to use Typescript or Go, only. Keep in mind, we would need to create all-new build tooling and observability approaches so there should be a substantial cost/performance benefit.

Why not use Rust? It's very fast!

Rust is certainly high performance, but at the cost of development speed. Also, because of Rust's low usage in web services compared to JS/TS and Go, common libraries and SDKs don't exist or are incomplete. For example, Stripe, and AWS have full-featured and production-ready SDKs for JS and Go, but not for Rust. Many benchmarks actually put Go fairly close to Rust as far as web server performance.

Also, technically we do use Rust for the Tauri desktop apps.