Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Currently we have a complex system to build a Topology and notify on changes.
- DiscoveryService receives Discovery message
- DiscoveryService calls TopologyViewManager to update State of a subscriber (publish pod in k8s)
- States are kept forever even if the subscriber dies
Then every 5s we create a TopologyView which contains the alive subscribers (reported with TTL).
Then we compute a diff between old and new topology view and call a listener with the diffs. At the end we set the new view as current view.
I propose we remove view and diff and simply notify the listener when we receive a DiscoveryMessage. When asked for the current view we simply compute the view from the alive states.