Checkpointing
This section is largely a light introduction to the hof datamodel
command, or hof dm
for short.
As we have mentioned, the hof dm
subcommands are utilities for managing the versioning and history of your datamodels.
Run hof dm -h
for the full listing.
The top-level data-modeling goes deeper into
the command and many related topics.
Checkpointing
We can run hof dm checkpoint
to create
a versioned snapshot of our data model.
With many snapshots, we can introspect
the history and diff between versions.
This opens up some interesting possibilities:
- check backwards compatibility and suggest appropriate semantic version changes
- automatically generating migrations as our program and data model evolve
- generating transformation functions between versions
- for supporting many versions while keeping business logic clear of these details
- feature flag capabilities
- deploying migrations and applications updates without downtime or coordination
- for supporting many versions while keeping business logic clear of these details
The inspiration for some of this is
- automating database migrations as applications evolve
- Project Cambria for the lenses concept
- grafana/thema for lacuna, or filling the gaps
Trying hof dm
You can try out the hof dm
commands by
hof dm checkpoint
to create a first snapshothof dm ...
list, info, history to introspect- add some fields or new models
hof dm diff
to see what has changed- the introspection commands to see backwards compatibility