Translate all README files to Russian
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
# 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_rules` for 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 value` against
|
||||
the reading — no hardcoded sensor/device names, everything comes from the
|
||||
`automation_rules` row.
|
||||
- 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).
|
||||
Зона ответственности:
|
||||
- Потребляет события «новое показание» из RabbitMQ (асинхронно — здесь
|
||||
надёжность доставки важнее задержки).
|
||||
- Загружает активные `automation_rules` для нужной зоны/устройства из
|
||||
PostgreSQL, кэшируя в памяти/Redis, чтобы не ходить в БД на каждое событие.
|
||||
- Оценивает условия правил обобщённо: `sensor_type X operator value` против
|
||||
показания — никаких зашитых названий датчиков/устройств, всё берётся из
|
||||
строки `automation_rules`.
|
||||
- При срабатывании: вызывает device-control-service по gRPC (нужен быстрый
|
||||
результат успех/неудача) и публикует событие в notification-service через
|
||||
RabbitMQ (не критично к задержке).
|
||||
|
||||
Not this service's job: talking to MQTT or Redis directly — device state
|
||||
changes always go through device-control-service's gRPC API.
|
||||
Не входит в зону ответственности: прямое взаимодействие с MQTT или Redis —
|
||||
изменения состояния устройства всегда идут через gRPC API device-control-service.
|
||||
|
||||
Reference in New Issue
Block a user