shijuvar/go-distributed-sys
44.4
Weak · 6 October 2026
3.8k
lines of production code
Go
primary language
4
measurements over time
What this system is
This repository serves as a collection of Go-based examples and demos for building distributed systems. It demonstrates architectural patterns using NATS JetStream for event streaming, gRPC for service communication, and CockroachDB for data persistence. The codebase provides practical implementations of observability, security, and database integration to illustrate how these components work together in a microservices environment.
Features
Added JetStream demo application
A new demo application has been added to the \jetstream-demo\ directory, showcasing the new JetStream Go SDK. The demo implements a distributed order processing system using Go, NATS Micro, and NATS JetStream. It includes a bootstrapper to create the 'ORDERS' stream, an order-request client to submit orders, and three microservices (\ordersvc\, \paymentsvc\, \reviewsvc\) that communicate via JetStream subjects (\ORDERS.created\, \ORDERS.paymentdebited\, \ORDERS.approved\) to handle order creation, payment debiting, and status review respectively.
jetstream-demo · high confidence
Added telemetry and NATS utility packages
This change introduces new packages to support distributed system observability and messaging. The \pkg/telemetry\ package integrates OpenCensus with Go kit, providing middleware for client and server endpoint tracing, retry annotation, and a multi-exporter setup that sends traces to Zipkin. The \pkg/natsutil\ package adds a reusable component for managing NATS connections and JetStream contexts, while \pkg/network\ provides a utility to detect the host's primary IPv4 address, which is used by the telemetry setup to identify the service instance.
pkg · high confidence
New CockroachDB, gRPC ALTS, and gRPCv1 example applications
Added new example code demonstrating CockroachDB integration via both the \database/sql\ driver and the GORM ORM, featuring transaction handling with retry logic. Included a complete gRPC example using Application Layer Transport Security (ALTS) for mutual authentication, along with the necessary x509 test certificates and key generation scripts. Also added a gRPCv1 example implementing a Customer service with both unary and server-streaming RPCs.
examples · high confidence
New event-driven demo with NATS JetStream and CockroachDB
This change introduces a new event-driven architecture demo within the \eventstream\ module. It replaces the previous implementation with a system using NATS JetStream for event streaming and CockroachDB for persistence. The demo includes a bootstrapper to initialize the NATS stream and database schemas, a gRPC-based Event Store service for creating and retrieving events, and a Go kit-based Order Service. It also features background workers (payment, query model, and review) that consume events from NATS JetStream to update the CockroachDB query models and trigger subsequent domain events.
eventstream · high confidence
Dependencies
Initial Go module definition with distributed system dependencies
The project now includes a go.mod file, establishing the module as github.com/shijuvar/go-distributed-sys and requiring Go 1.27.1. This manifest introduces dependencies for a distributed systems toolkit, including NATS messaging (nats.go v1.53.1), gRPC (google.golang.org/grpc v1.83.2), Go kit (github.com/go-kit/kit v0.13.0), and database drivers for CockroachDB and PostgreSQL. It also adds libraries for distributed tracing and metrics via OpenCensus and Zipkin, alongside utility packages for UUID generation and HTTP routing.
(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
Score
- CAI 40 → 44 (+4.3)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 99 → 86 (-13.7)
- Architecture 73 (new)
- Maturity 55 → 55 (+0.0)
- Readiness 10 → 19 (+9.2)
- Security 78 → 82 (+4.4)
Resolved (1)
- Documentation: no installation or build instructions (README.md)
New (34)
- Duplicated block (10 lines × 2) (eventstream/order/contracts.go)
- Duplicated block (11 lines × 2) (eventstream/gokit-ordersvc/implementation/service.go)
- Duplicated block (11 lines × 2) (examples/grpcv2/client/main.go)
- Duplicated block (11 lines × 2) (examples/nats-basics/withcli/nats-pub/main.go)
- Duplicated block (11–12 lines × 3) (eventstream/gokit-ordersvc/implementation/service.go)
- Duplicated block (12 lines × 3) (examples/nats-basics/withcli/nats-bench/main.go)
- Duplicated block (12–13 lines × 2) (eventstream/paymentworker/main.go)
- Duplicated block (13 lines × 2) (eventstream/paymentworker/main.go)
- Duplicated block (13 lines × 2) (examples/nats-basics/withcli/nats-pub/main.go)
- Duplicated block (13 lines × 3) (examples/grpcv1/server/main.go)
- Duplicated block (14 lines × 2) (examples/nats-basics/withcli/nats-bench/main.go)
- Duplicated block (14 lines × 2) (examples/nats-basics/withcli/nats-echo/main.go)
- Duplicated block (14 lines × 2) (examples/nats-basics/withcli/nats-qsub/main.go)
- Duplicated block (14 lines × 2) (examples/nats-basics/withcli/nats-req/main.go)
- Duplicated block (14 lines × 3) (examples/nats-basics/withcli/nats-pub/main.go)
- Duplicated block (15–16 lines × 2) (eventstream/querymodelworker/main.go)
- Duplicated block (16 lines × 2) (jetstream-demo/paymentsvc/main.go)
- Duplicated block (16 lines × 3) (examples/grpcv1/client/main.go)
- Duplicated block (17 lines × 2) (examples/grpcv2/server/main.go)
- Duplicated block (17 lines × 2) (examples/nats-basics/withcli/nats-qsub/main.go)
- …and 14 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
shijuvar/go-distributed-sys 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 6 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2e2a05a4fcc7a249ef09925c530c71fc0ff51deb — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-1f9c535fa862.