Ahoo Wang

Systems architect · Open-source builder

Ahoo Wang

Clear boundaries for complex systems.

I design AI agent platforms and distributed systems, and I build the open-source infrastructure under them. I care not just that a system works, but why it works the way it does.

NowAgent orchestration engines · Distributed systems · DDD & Event Sourcing

Email meGitHub

wow · Wow write path
Wow write pathA command reaches an aggregate, which decides and appends domain events to the event store. The event bus fans those events out to projections, sagas and snapshots.sendeventevent busCommandCommandGatewayAggregateonCommand()Event Storeappend()Projectionread modelSaga@StatelessSagaSnapshotSnapshotStoregiven → whenCommand → expectEventTypeWow write pathA command reaches an aggregate, which decides and appends domain events to the event store. The event bus fans those events out to projections, sagas and snapshots.sendeventevent busCommandCommandGatewayAggregateonCommand()Event Storeappend()Projectionread modelSaga@StatelessSagaSnapshotSnapshotStoregiven → whenCommand → expectEventType
open-source projects
16
GitHub stars
2.9k
active in the last 30 days
14/16

01 / Work

Selected work

Three projects, and the decisions behind them.

  1. 01github.com/Ahoo-Wang/Wow★ 305

    Wow

    Put the domain model at the heart of the system.

    CartSpec.ktkotlin
    class CartSpec : AggregateSpec<Cart, CartState>(
        {
            on {
                val ownerId = generateGlobalId()
                val addCartItem = AddCartItem(
                    productId = "productId",
                    quantity = 1,
                )
                givenOwnerId(ownerId)
                whenCommand(addCartItem) {
                    expectNoError()
                    expectEventType(CartItemAdded::class)
                    expectState {
                        items.assert().hasSize(1)
                    }
                    // …
    A real aggregate spec from the Wow examples
    Problem
    Complex business rules need traceable state changes and coordination across aggregates.
    Decision
    Model every write as command → domain decision → event → projection, and verify behavior with Given → When → Expect specifications.
    Trade-off
    Worth it where history and rules justify Event Sourcing; plain CRUD may not need the cost.
  2. 02github.com/Ahoo-Wang/CosId★ 651

    CosId

    Unique IDs without a coordination bottleneck.

    SegmentChainId · segment chainlock-free
    SegmentChainId · segment chainIDs are handed out from the head segment with a lock-free compare-and-set. Behind it, prefetched segments wait in a chain at least a safe distance long. A PrefetchWorker appends new segments from an IdSegmentDistributor backed by Redis, JDBC, ZooKeeper or MongoDB, doubling the prefetch distance when the generator is hungry and halving it when the chain is full.generate()vv+1v+2+headsafeDistance ≥ 2appendPrefetchWorkerhungry ×2 · full ÷2IdSegmentDistributorRedis · JDBC · ZooKeeper · MongoDB
    SnowflakeId bit layout64 bit

    A 64-bit ID: 1 unused sign bit, a 41-bit millisecond timestamp (about 69 years), a 10-bit machine ID (1,024 nodes) and a 12-bit sequence (4,096 IDs per millisecond).

    ops/s · SegmentChainId
    127M+
    ops/s · CosIdGenerator
    15.6M
    IDs/s per node · Snowflake
    4.096M

    JMH benchmarks, CosId docs

    Problem
    Distributed ID generation must handle machine identity, clock rollback and coordination overhead.
    Decision
    Two families of generators. SegmentChainId links ID segments into a lock-free chain; a PrefetchWorker keeps a safe distance of segments ready, doubling it when the generator runs hungry and halving it when the chain is full. SnowflakeId adds automatic machine-ID allocation and clock-rollback handling.
    Trade-off
    Pick the algorithm and coordination store per deployment; component benchmarks are not application throughput guarantees.
  3. 03github.com/Ahoo-Wang/CoSky★ 96

    CoSky

    Service governance without a heavy footprint.

    CoSky read path0 RTT
    CoSky read pathApplications read configuration and instances from an in-process cache. Redis Pub/Sub pushes changes into that cache, so only writes and cache misses go over the network to Redis.applicationget()local cachein-processRedissource of truthhot path · no networkPub/Subwrite / miss
    ops/s · config read, local cache
    706.7M
    ops/s · config read, Redis
    58.8k
    faster on the hot path
    ≈12,000×

    JMH, 8 threads, Apple M4 Pro, CoSky 6.0.0

    Problem
    Services need discovery and shared configuration without another heavy cluster to operate.
    Decision
    Build on Redis: in-process caches kept fresh by Pub/Sub, integrated with Spring Cloud.
    Trade-off
    A focused choice where Redis already fits; availability follows the Redis deployment you choose.

02 / Principles

Start with the problem, then choose the tools.

I look for the structure behind a problem before choosing the design and technology to express it. Open source keeps those decisions inspectable, debatable and able to evolve.

  1. 01

    Make intent visible

    Start from the domain. Express business intent in explicit, testable models.

  2. 02

    Give change a boundary

    Make responsibilities and dependencies explicit, so the system can evolve without losing integrity.

  3. 03

    Let evidence lead

    Explain a design with code, tests and benchmarks — and state its costs and limits.

03 / Open source

Built in the open

Different problems, one engineering mindset.

Architecture frameworks03

  • Wow

    Reactive DDD, CQRS and Event Sourcing framework — domain model as a service.

    ● last push 2026-10

    ★ 305
  • CoSec

    Multi-tenant reactive security framework built on RBAC and policies.

    ● last push 2026-10

    ★ 46
  • wow-project-template

    Starter template for Domain-Driven Design projects on Wow.

    ● last push 2026-10

    ★ 23

Distributed infrastructure04

  • CosId

    Universal, flexible, high-performance distributed ID generator.

    ● last push 2026-10

    ★ 651
  • CoSky

    Lightweight service discovery and configuration on Redis.

    ● last push 2026-10

    ★ 96
  • Simba

    Distributed lock service for coordination and scheduling.

    ● last push 2026-10

    ★ 33
  • CoCache

    Level-two distributed coherence cache.

    ● last push 2026-10

    ★ 16

AI & developer tools07

  • GodeX

    OpenAI Responses API gateway that turns any model into a Codex engine.

    ● last push 2026-09

    ★ 25
  • fetcher

    Fetch-based HTTP client ecosystem with native LLM streaming and React support.

    ● last push 2026-10

    ★ 15
  • Ahoo Skills

    Agent skills synced from my projects, packaged as Codex and Claude Code plugins.

    ● last push 2026-10

  • Cobal

    Load balancing for LLM client SDKs with Resilience4j circuit breakers.

    ● last push 2026-10

  • CoApi

    Zero-boilerplate HTTP client definitions for Spring 6.

    ● last push 2026-10

    ★ 10
  • FluentAssert

    Fluent assertions for JDK types in Kotlin tests.

    ● last push 2026-10

  • elasticsearch-script-velocity

    Velocity templates for Elasticsearch scripts.

    ● last push 2026-08

.NET02

  • SmartSql

    High-performance C# ORM with caching and read/write splitting.

    ● last push 2026-09

    ★ 1.1k
  • SmartCode

    Code generation platform driven by structured data sources.

    ● last push 2023-12

    ★ 576

All repositories on GitHub

04 / Contact

Good questions deserve thoughtful conversations.

Systems design, agent architecture, open source, or a hard engineering problem — I'd like to hear about it.