What you will learn in Build and Orchestrator in Go (From Scratch)
Chapter by chapter
Concepts explained in this book
- Docker Swarm manager nodeA manager is the control component of an orchestration system that accepts user requests, schedules tasks, tracks execution, and collects worker metrics.
- workerA worker is a machine or node in an orchestration system that executes assigned application tasks or jobs.
- contractAn API is a defined interface through which software components request operations or exchange data.
- run taskrunTask is a worker method that retrieves a queued task, ensures it is stored, and manages its execution according to its state.
- store.StoreThe Store interface is a Go interface defining operations for persisting and retrieving tasks and event data without exposing the underlying storage implementation.
- GetThe store Get method retrieves the task associated with a string key and reports an error when the key is absent.
- store put methodThe store Put method writes or replaces a task in a task store and reports whether the operation failed.
- UpdateTasksUpdateTasks is a worker method that refreshes tracked task states by inspecting their containers and updating their lifecycle information.
- in-memory task storeAn in-memory task store is a task storage implementation that keeps task records in volatile memory.
- list methodThe store List method returns all tasks in the persistent task store as a slice of task pointers.
- ContainerCreateContainerCreate is a Docker client API operation that creates a container from image, host, network, and platform configuration.
- ContainerStartContainerStart is a Docker client API operation that starts an existing container by identifier.
- docker stopContainerStop is a Docker client API operation that stops a running container by identifier.
- sendworkSendWork is a manager method that selects a worker and sends it a task event through the worker API.
- goprocinfogoprocinfo is a Go library for reading system and process metrics from the proc filesystem.
- task eventA task event is an internal object that records a requested task state transition and the time it was requested, while carrying the associated task.
- score methodScore is a scheduler-interface method that assigns a numeric placement score to each candidate node for a task.
- image pull commandImagePull is a Docker client API operation that downloads a container image from a registry.
- goroutineA goroutine is a lightweight concurrent execution unit managed by the Go runtime.
- cubeThe book's orchestration system that schedules and runs task instances on worker nodes.
- bboltBoltDB is an embedded persistent key/value database implemented as a Go library.
- containerA container is an isolated application execution environment that packages software and its dependencies while sharing the host operating system kernel.
- in-memory databaseAn in-memory store is a storage implementation that keeps its data in volatile memory rather than persistent storage.
- health checkA health check is an operation that evaluates whether a running task is functioning normally, typically by calling an endpoint and interpreting its response.
- schedulerA scheduler is a component that assigns tasks to machines or nodes according to placement decisions.
- CobraCobra is a Go library and framework for building command-line applications with commands, arguments, flags, and handlers.
- contextA Go context carries request-scoped values, deadlines, and cancellation signals across API and process boundaries.
- metricA metric is a measured value describing the state or performance of a worker machine.
- round-robin load balancingA round-robin scheduler selects machines in a repeating circular order rather than ranking them by a calculated score.
- DockerA Docker container is an isolated runtime environment created and managed by Docker for executing software and its dependencies.
- current stateThe task lifecycle state currently recorded for a task based on the worker's actual condition.
- completed stateThe completed state is the lifecycle state of a task that has finished successfully or has been stopped by a user.
- failed stateThe failed state is the lifecycle state of a task that has crashed or stopped working as expected.
- pending stateThe pending state is a task lifecycle state in which a task has not yet entered the scheduling or execution phases.
- running stateThe running state is the task lifecycle condition in which a task has successfully started execution.
- scheduled stateThe scheduled state is the lifecycle state of a task for which an execution machine has been selected but execution has not yet started.
- load averageA load average is a measure of the average amount of work waiting for or using CPU resources over a time interval.
- type assertionA type assertion is a Go operation that extracts a value of a specified concrete or interface type from an interface value.
- empty interfaceAn empty interface is a Go interface type that imposes no method requirements and can hold a value of any type.
- E-PVM schedulerAn E-PVM scheduler is a scheduling algorithm that combines heterogeneous resource usage into a cost and assigns work to the machine with the lowest resulting cost.
- queueA queue is a data structure that stores items for processing in an order determined by their insertion sequence.
- cobra-clicobra-cli is a command-line tool for generating and managing applications built with the Cobra Go command-line framework.
- in-memory event storeAn in-memory event store is a store implementation that keeps task event records in memory.
- chichi is a lightweight Go HTTP router for mapping requests to handler functions.
- event storeAn event store is a persistent datastore that records and retrieves task lifecycle events.
- bucketA bucket is a named grouping of key-value pairs within a BoltDB database.
- desired stateThe task lifecycle state requested for a task by an item placed on the worker's queue.
- separation of concernsSeparation of concerns is a software design principle that assigns distinct responsibilities to separate components or modules.
- read-only transactionA read-only transaction is a database transaction that permits data retrieval without modifying persistent data.
- read-write transactionA read-write transaction is a database transaction that can read existing data and modify persistent data.
- database transactionA database transaction is an operation context that provides a consistent view of database data while applying reads or writes.
- restart policycontainer.RestartPolicy is a Docker API configuration structure specifying how a container is handled after termination or failure.
- finite-state machineA state machine is a computational model consisting of defined states and transitions between those states in response to events or conditions.
- CPU usage calculationCPU usage calculation derives active CPU time by subtracting idle time from total CPU time and dividing by total time.
- CPUStatCPUStat is a goprocinfo type representing the time a CPU spends in different execution states.
- MemInfoMemInfo is a goprocinfo type representing memory information read from the Linux proc filesystem.
- marginal costMarginal cost is the increase in a machine's aggregate resource cost that would result from assigning an additional task to it.
- JSONJSON is a text-based data interchange format that represents structured values using objects, arrays, names, and values.
- Go SDKThe Docker SDK is a client library that lets software interact programmatically with the Docker Engine API.
- key-value storeA key/value store is a datastore that associates unique keys with values for direct lookup.
- nodeA node is a machine-representing object in a cluster that exposes identity, network location, capacity, and allocation information for scheduling.
- virtual machineA software-defined computer that abstracts physical hardware so multiple operating systems can run on one physical machine.
- computer clusterA cluster is a coordinated collection of manager and worker machines operated together by an orchestration system.
- state transition mapA state transition map associates each current task state with the states to which it may validly transition.
- state transitionA state transition is a change of a task from one lifecycle state to another in response to an event.
- worker commandA worker command is a command-line operation that starts or manages the worker component of the orchestration system.
- skeleton codeSkeleton code is an incomplete program structure that defines a system's main components and boundaries without implementing all details.
- pickingPicking is a scheduling phase that selects the highest- or lowest-scoring worker according to the scoring policy.
- task queueA task queue is a data structure that holds submitted tasks awaiting processing in an ordered sequence.
- task storeA task store is a component that stores and retrieves task records through a defined store interface.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
