educative.io

Educative

Why do we need Pub Sub System for this problem?

When a user deviates from the optimal path from the current location to the destination, shouldn’t we get updated optimal path via findRoute API. I don’t understand why we need PubSub System here if there is user deviation from optimal path.