Posts tagged Gortex
The Six Things We Didn't Build: What the Framework Teaches
Six things gortex deliberately left unbuilt, from a full graceful-shutdown chain to OpenAPI generation, and the principles the whole series teaches.
The Security Middleware Suite: CORS / CSRF / JWT / Rate Limit / Binder
Gortex keeps body caps, CORS, CSRF, JWT, rate limiting and log redaction at framework level; JWT is pinned to HS256 and per-IP limiting behind a proxy needs TrustedProxies.
Observability: Three-State Health Checks and a Tracing Abstraction
Gortex health checks report Healthy, Degraded or Unhealthy, adding a degraded state beyond up/down; tracing depends on one Tracer interface, with OTel as an adapter.
The WebSocket Hub: Go's Take on the Actor Model
Gortex's WebSocket Hub is the actor model in Go: one goroutine owns all state, callers reach it over channels instead of locks, and slow consumers are dropped.
Concurrent Counting and Resilience: Sharded Metrics and a Circuit Breaker
How gortex shards one metrics lock into sixteen, counts with atomics, keeps a three-state circuit breaker consistent, and why a channel is the wrong tool here.
The Zero-Allocation Secret: Context Pool and smartParams
How gortex's routing hot path reaches 0 allocs/op: sync.Pool Context reuse, a [4]string smartParams, an embedded responseWriter, and how to measure it.
The Segment-Trie Router: Matching Without Regex
Gortex routes with a segment trie, not regex: string splitting plus map lookups, O(segments) when no backtracking is needed, static > param > wildcard precedence, no allocations.
Struct-Tag Routing: reflect in Practice
How gortex builds its route table from struct tags with reflect: method names pick the verb, middleware inherits down groups, and bad config fails at startup.
Why Build a Kitchen-Sink Framework
Why gortex is a kitchen-sink framework: what a framework layer trades away once the goal shifts from one lean microservice to consistency across services.