How hajdukdusan/proplyd works
proplyd is a centralized, namespace-configurable cache in front of etcd. Applications use the Go client, which normally sends cache operations over gRPC and falls back to its configured backing store when the cache is unavailable; cache-aside reads also load from that store and offer the result back to the cache. On the server, the gRPC service delegates to the cache engine, which applies per-namespace read/write strategies and revision-aware consistency, stores entries in an eviction-managed in-memory store, and synchronizes changes from etcd watches. The README documents additional strategies and eviction options not traceable through the sampled excerpts; their paths are shown only where supported by the tree.
Main entry points: namespace.go Namespace runtime · client.go Go client · backend.go Backend interface · main.go Server entry point
Components 16
Client access
- Go client
client/client.go - Shared config
protocol/config.go
Cache service
- gRPC API
api/proplyd/v1/cache.proto - gRPC service
server/server.go - Cache engine
cache/engine.go - Server entry point
cmd/proplyd/main.go
Consistency and policies
- Namespace runtime
cache/namespace.go - Revision changelog
cache/changelog.go - Watch sync
cache/watch.go - Write-behind flusher
cache/writebehind.go - Eviction store
store/hot.go
Backing storage
- Backend interface
backend/backend.go - etcd adapter
backend/etcd/etcd.go - Memory backend
backend/memory/memory.go
Other components
- Applications
- etcd cluster
Connections 18
- Applications → Go client: uses
- Go client → gRPC API: sends RPCs
- Go client → Shared config: uses config
- Go client → etcd adapter: fallback reads/writes
- gRPC service → gRPC API: implements
- gRPC service → Cache engine: delegates operations
- Cache engine → Namespace runtime: routes operations
- Namespace runtime → Eviction store: reads/writes entries
- Namespace runtime → Backend interface: loads and mutates
- Namespace runtime → Revision changelog: checks revisions
- Watch sync → Backend interface: starts watch
- Watch sync → Namespace runtime: applies events
- Write-behind flusher → Backend interface: flushes batches
- etcd adapter → etcd cluster: reads/writes/watches
- Memory backend → Backend interface: implements
- Server entry point → Cache engine: creates
- Server entry point → etcd adapter: configures backend
- Server entry point → gRPC service: starts service