Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

The master job coordinator

In this section, we will explore the implementation of the job coordinator component that is responsible for orchestrating the execution of a distributed graph computation job on the master node.

In a similar fashion to how the worker job coordinator was implemented, we will start by defining a configuration struct to hold the necessary details for creating a new coordinator instance and then proceed to define the masterJobCoordinator type:

type masterJobCoordinatorConfig struct {
    jobDetails job.Details
    workers    []*remoteWorkerStream
    jobRunner  job.Runner
    serializer Serializer
    logger     *logrus.Entry
}

type masterJobCoordinator struct {
    jobCtx       context.Context
    cancelJobCtx func() barrier *masterStepBarrier partRange ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content