Sets up the microservice home-automation platform skeleton: docker-compose for mosquitto/postgres/clickhouse/redis/rabbitmq, per-service README stubs describing responsibilities, and top-level README with architecture/stack. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rule-engine-service (Go)
Status: not implemented yet.
Responsibility:
- Consume "new reading" events from RabbitMQ (async — delivery reliability matters more than latency here).
- Load active
automation_rulesfor the relevant zone/device from PostgreSQL, caching in memory/Redis to avoid a DB round-trip per event. - Evaluate rule conditions generically:
sensor_type X operator valueagainst the reading — no hardcoded sensor/device names, everything comes from theautomation_rulesrow. - On match: call device-control-service over gRPC (needs a fast pass/fail result) and publish an event to notification-service over RabbitMQ (not latency-critical).
Not this service's job: talking to MQTT or Redis directly — device state changes always go through device-control-service's gRPC API.