January 2020
Intermediate to advanced
640 pages
16h 56m
English
In a similar fashion to the crawler service, the PageRank service also wakes up periodically to recalculate the PageRank scores for every link in the graph. Under the hood, it uses the PageRank calculator component that we built in Chapter 8, Graph-Based Data Processing, to execute a complete pass of the PageRank algorithm. The service layer is responsible for populating the internal graph representation that's used by the calculator component, invoking it to calculate the updated PageRank scores, and updating the PageRank scores for every indexed document.
The service constructor also accepts a Config object that looks like this:
type Config struct { GraphAPI GraphAPI IndexAPI IndexAPI PartitionDetector partition.Detector ...