January 2020
Intermediate to advanced
640 pages
16h 56m
English
Now, let's take a look at the protocol buffer definition for the payloads sent by the master to the individual workers:
message MasterPayload { oneof payload { JobDetails job_details = 1; Step step = 2; RelayMessage relay_message = 3; }}When a worker connects to the job queue, it blocks until the master assigns it a new job by sending out a JobDetails message:
message JobDetails { string job_id = 1; google.protobuf.Timestamp created_at = 2; // The [from, to) UUID range assigned to the worker. Note that from is // inclusive and to is exclusive. bytes partition_from_uuid = 3; bytes partition_to_uuid = 4;}The job_id field contains a unique ID for the job to be executed while ...