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

Transitioning through the stages of the graph's state machine

The role of the runJobToCompletion method is to execute all stages of the graph's state machine until either the job completes or an error occurs.

As you can see in the following code snippet, we request from the executor instance to run the graph algorithm until its termination condition is met. Then, the worker reports its success to the master by joining the barrier for the EXECUTED_GRAPH step.

Once all other workers reach the barrier, the master unblocks us and we proceed to invoke the CompleteJob method on the user-provided job.Runner instance. Then, we notify the master that the calculations have been stored by joining the barrier for the PERSISTED_RESULTS step.

After the ...

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