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

Running a new job

After the end user starts the master's gRPC server, they can request a new job execution by invoking the master's RunJob method, the signature of which is as follows:

func (m *Master) RunJob(ctx context.Context, minWorkers int, workerAcquireTimeout time.Duration) error {
    // implementation omitted
}

Because the worker requirements generally vary depending on the algorithm to be executed, the end user must specify, in advance, the minimum number of workers required for the job as well as a timeout for acquiring the required workers.

If the number of workers is not important from the user's perspective, they can specify a zero value for the minWorkers argument. Doing so serves as a hint to the master to either select all workers ...

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