11 Implementing persistent storage for tasks
This chapter covers
- Describing the purpose of a datastore in an orchestration system
- Defining the requirements for our persistent datastore
- Defining the
Store
interface - Introducing BoltDB
- Implementing the persistent datastore using the
Store
interface - Discussing the special concerns that exist for the manager’s datastore
The fundamental unit of our orchestration system is the task
. Up until now, we have been keeping track of this fundamental unit by storing it in Go’s built-in map
type. Both our worker and our manager store their respective tasks in a map. This strategy has served us well, but you may have noticed a major problem with it: any time we restart the worker or the manager, they lose all ...
Get Build an Orchestrator in Go (From Scratch) now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.