Skip to content
CAI
Software that uses CAICheck a score

giggio/rinhaback2401-01

30.2

Weak · 20 September 2026

1.2k

lines of production code

VB.NET

with C#

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a high-performance backend service for the 'Rinha de Backend' challenge, implemented in both C\# and Visual Basic. It manages client transactions and account statements using PostgreSQL, with a focus on minimizing latency through optimized database queries, connection pooling, and conditional compilation for performance tuning. The architecture includes an Envoy proxy for traffic routing and supports configurable observability via OpenTelemetry, which can be disabled in optimized builds to reduce overhead.

Features

Initial release of the VB (Visual Basic) backend implementation

This entry introduces the complete Visual Basic implementation for the Rinha de Backend challenge. The application is an ASP.NET Core service exposing endpoints for client transactions and account statements, backed by a PostgreSQL database via Npgsql. It features a custom command pool for database operations, configurable logging and metrics (OpenTelemetry) via environment flags, and is containerized with a multi-stage Dockerfile and a docker-compose setup including an Envoy proxy.

rinhaback2401vb · high confidence

Behavioural changes

Added .NET monitoring, Envoy proxy, and solution filters; updated .NET SDK and Nginx configuration

This change introduces several infrastructure and development tooling updates. A new Envoy proxy configuration (envoy.yaml) is added to route traffic on port 9999 to backend services on ports 9997 and 9998. A .NET monitoring setup is introduced via a new Dockerfile.monitor and monitor.sh script, utilizing the dotnet-counters tool to observe runtime metrics. The solution structure is refined with the addition of solution filters (.slnf) for both C\# and VB projects, and the main solution file (rinhaback2401.sln) is updated to include these filters, a new VB project, and SQL-related items. The .NET SDK version in global.json is relaxed to allow any major version, and the Dockerfile.monitor is updated to use a broader SDK tag and specific counter names. Nginx configuration is simplified by reducing worker connections, switching to HTTP mode, and removing load-balancing algorithms and failover settings.

(repo-wide) · high confidence

Database access refactored for performance with conditional pooling and optimized queries

The database layer in the Model project has been significantly restructured to improve performance and resource management. The \Db\ class now uses \NpgsqlDataSource\ for connection management instead of a manual connection pool, and database commands are handled via conditional compilation: \Db.direct.cs\ provides a non-pooled implementation for standard builds, while \Db.pooled.cs\ offers a high-performance command pool when the \POOL\_OBJECTS\ flag is enabled. The \Pool\<T\>\ utility has been rewritten to use \System.Threading.Channels\ for more efficient concurrency control, with additional optimizations available via the \EXTRAOPTIMIZE\ flag. Additionally, the \GetTransacoes\ query now strictly limits results to 10 items, and the \AddAsync\ method returns a simplified \AddStatus\ enum instead of a complex error record, streamlining the API for clients.

rinhaback2401/Model · high confidence

Optimized build mode removes logging, health checks, and counters

The application now supports an optimized build configuration (controlled by the EXTRAOPTIMIZE flag) that significantly reduces runtime overhead by disabling non-essential features. When this mode is active, request logging, health check endpoints, and OpenTelemetry metrics counters are removed from the service to improve performance. The API endpoints themselves remain functional, but the diagnostic and observability capabilities are stripped out in this specific build variant.

rinhaback2401 · high confidence

Optimized transaction creation logic and database schema

The transaction creation process has been optimized to reduce unnecessary database writes and improve query performance. The \criartransacao\ function now uses \RETURNING\ to fetch updated client limits and balances in a single step, and only updates the client's balance if the transaction is valid (positive value or within limit). Additionally, the \transacao\ table schema was updated to set the transaction timestamp default to UTC automatically, and a new index on \idcliente\ was added to speed up lookups by client.

sql · high confidence

Dependencies

New VB.NET project and dependency updates for C\# project

A new VB.NET project (rinhaback2401vb) has been added, targeting .NET 8.0 and including packages for Npgsql, OpenTelemetry, and Swashbuckle. The existing C\# project (rinhaback2401) has been updated to remove the Nito.AsyncEx.Coordination dependency and add OpenTelemetry packages, while also introducing new build configuration conditions for object pooling, trimming, AOT, and extra optimization.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 30.

Lenses

  • Code Health 77
  • Architecture 98
  • Maturity 22
  • Readiness 19
  • Security 35

Changes since last survey

  • 31 commits — 30 feature/other, 1 fixes

By area

  • (root) — 10 commits
  • rinhaback2401/Model — 9 commits
  • rinhaback2401/Program.cs — 3 commits
  • sql/criartransacao.sql — 2 commits
  • rinhaback2401/Counters.cs — 1 commit
  • rinhaback2401/Dockerfile — 1 commit
  • rinhaback2401/JsonHelpers.cs — 1 commit
  • rinhaback2401/rinhaback2401.http — 1 commit
  • rinhaback2401vb/Model — 1 commit
  • rinhaback2401vb/Program.vb — 1 commit
  • sql/ddl.sql — 1 commit

Notable commits

  • fix: Fix validation problems
  • change: Adapt for null description
  • change: Add VB
  • change: Add counters
  • change: Add extreme optimizations
  • change: Add gitattributes to sln
  • change: Add index to transacoes
  • change: Add monitor files
  • change: Add several optimizations
  • change: Add solution filters
  • change: Allow to choose how to build the project
  • change: Change function to return only what is required
  • change: Code cleanup
  • change: DisposeAsync of reader
  • change: Dont use DI for Db
  • change: First iteration
  • change: Insert in transacao only if needed
  • change: Limit transacao to 10 items
  • change: Remove cancellation tokens
  • change: Remove curl from image
  • …and 11 more

API surface

  • 3 HTTP endpoints (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

giggio/rinhaback2401-01 was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 73322035325595babc9216749cee1ba1451d17b8 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.