$ show asynkron/protoactor-dotnet
Proto.Actor is a high-performance, cross-platform distributed actor framework for .NET. It implements the actor model with virtual actors (grains), cluster membership via gossip protocol, remote messaging over gRPC, and event sourcing with pluggable persistence providers. The architecture is modular: the core actor runtime (Proto.Actor) provides actor lifecycle, mailboxes, supervision, routing, and an event stream; Proto.Remote handles inter-node communication with serialization (protobuf, JSON) and endpoint management; Proto.Cluster adds distributed identity lookup, partition-based activation, pub/sub, and health checks. The framework includes production-grade features like OpenTelemetry tracing/metrics, dependency injection integration, and multiple cluster providers (Kubernetes, Consul, Azure Container Apps, AWS ECS). Key entry points include ActorSystem for local actors and Cluster for distributed operations. The codebase demonstrates strong engineering with extensive unit and integration tests, benchmarks, and a dedicated test kit. Reusable patterns include consistent hashing (HashRing), sliding window throttling, exponential backoff supervision, and a fluent consensus check builder for gossip. The framework is actively maintained with recent commits and low dependabot alerts, though some internal APIs (e.g., obsolete loggers, CouchbaseNetClient 2.7.x) show moderate technical drift. Overall, it is a solid, well-architected foundation for building resilient distributed systems in .NET.
The LLM identified 3 files worth highlighting for reuse:
A sliding window rate limiter that throttles actions based on a maximum rate and interval. It is self-contained, uses only basic .NET primitives, and can be extracted into any project needing simple throttling (e.g., for logging, API calls). Demonstrates clean, non-obvious implementation of a token bucket style limiter.
A consistent hash ring implementation with virtual nodes for even distribution. It is isolated from the rest of the actor framework (only depends on standard .NET collections) and can be reused in any distributed system for key-based routing or sharding. Provides add/remove operations and a GetNode method. Non-obvious because it handles rebalancing and virtual nodes efficiently.
A pure implementation of the MurmurHash2 non-cryptographic hash function. It is a single file with no dependencies, making it trivially reusable. Useful for hash-based distribution, bloom filters, or consistent hashing. Demonstrates careful bit-level optimization and correctness.