Federation
Main federation tasks
- For UnitNode, the ability to create a connection between instances to receive data with QoS <= 1.
- Synchronization of public Repo Registries into a single registry of available repositories.
- Ability for a user to fully download their data and back up their account.
Instance moderation in federation
- Automatic ban (incrementing by 1, 7, 30 days) of external UnitNodes that exceed limits between instances.
- Automatic system for breaking trust between instances with adding the instance to a blacklist.
- Manual disabling of instances by administrators through blacklists, for edge cases.
Implementation through MessageProcessor
DataPipe -> MessageProcessor
gRPC, messages are signed with certificates, load status model from federation.
Service tasks
- The service is subscribed to all messages matching
+/+/pepeunitand+/+. - The service separates external messages from internal ones by
domain.com. - The service sends messages to external instances over gRPC, where they are received by the same service.
- The service receives external messages over gRPC and republishes them to EMQX.
- The service sets a set of message parameters, TTL, etc., to avoid loops and duplicates.
- The service counts MPS for external domains, split by each domain and each topic.
- The service decides when to break trust between instances.
- The service decides when to block a Unit.
- The service contains the configuration of all connections.
- The service contains balance information.