You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+24-22Lines changed: 24 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This design document shall be stable and amendments go through a proper process
10
10
11
11
## Overview
12
12
13
-
Standard is a collection of functionality and best practices (_"framework"_) to bootstrap and sustain the automatable sections of the Software Delivery Lifecycle (SDLC) _efficiently_ with the power of Nix and Flakes.
13
+
Standard is a collection of functionality and best practices (_"framework"_) to bootstrap and sustain the automatable sections of the Software Development Lifecycle (SDLC) _efficiently_ with the power of Nix and Flakes.
14
14
In particular, Standard is a _Horizontal\* Integration Framework_ which integrates _vertical\*_ tooling.
15
15
16
16
> <sub>We occasionally adapt concepts from non-technical contexts. This is one instance.</sub>
@@ -22,14 +22,14 @@ In particular, Standard is a _Horizontal\* Integration Framework_ which integrat
22
22
What is being integrated are the end-to-end automatable sections of the SDLC.
23
23
For these we curate a collection of functionality, tools and best practices.
24
24
25
-
An SDLCs _efficiency_on the is characterized by two things.
25
+
An SDLCs _efficiency_ is characterized by two things.
26
26
27
27
Firstly, by adequate _lead time_ which is the amount of time it takes to set up an initial version of the software delivery pipeline.
28
28
It needs to be _adequate_ rather than _just fast_, as it takes place in the context of a team.
29
29
Rather than for speed, they need optimization for success.
30
30
For example, a process needs to be documented & explained and your team needs to be trained on it.
31
31
Standard encourages incremental adoption in order to leave enough space for these paramount activities.
32
-
If you're in a hurry and your team is onboard, though, you still can jumpstart the implementation.
32
+
If you're in a hurry and your team is onboard, though, you still can jumpstart its adoption.
33
33
34
34
Secondly, efficient SDLCs are characterized by short _cycle times_ which is the amount of time it takes for a designed feature to be shipped to production.
35
35
Along this journey, we encounter our scope (more on it below):
@@ -50,16 +50,17 @@ Additionally, unlike similar projects, we harness the power of Nix & Flakes to e
50
50
-_Complete_: Standard should cover the important use cases for setting up and running the automatable sections of the SDLC.
51
51
-_Optimized_: Standard should optimize both for the needs of the individual developers and the market success of the product.
52
52
-_Integrated_: Standard should provide the user with a satisfying integration experience across a well-curated assortment of tools and functionality.
53
+
-_Extensible_: Standard should account for the need to seamlessly modify, swap or extend its functionality when necessary.
53
54
54
-
Please defer to the [sales pitch](./PITCH.md), if you need more excitement.
55
+
Please defer to the [sales pitch](./PITCH.md), if you need more context.
55
56
56
57
## Ideals
57
58
58
59
While we aim to improve the SDLC by applying Nix and its ecoysystem's ingenuity to the problem, we also want to build bridges.
59
60
In order to bring the powers of store based reproducible packaging to colleagues and friends, we need to maneuver around the ecosystem's pitfalls:
60
61
61
62
-_Use nix only where it is best suited_— a Nix maximalist approach may be an innate condition to some of us, but to build bridges we deeply recognize and value other perspectives and don't dismiss them as ignorance.
62
-
-_Disrupt where disruption is necessary_— the Nix ecosystem has a fairly rigid set of principles and norms that we don't think always apply in our use cases.
63
+
-_Disrupt where disruption is necessary_— the Nix ecosystem has a fairly rigid set of principles and norms that we don't think always apply in every use case.
63
64
-_Look left, right, above and beyond_— our end-to-end perspective commands us to actively seek and reach out to other projects and ecosystems to compose our value chain; there's no place for the "not invented here"-syndrome.
64
65
65
66
## Scope
@@ -85,9 +86,9 @@ And we focus on:
85
86
86
87
## Architecture
87
88
88
-
### Overview
89
+
With clarity about Standard's general scope and direction, let's procede to get an overview over its architecture.
89
90
90
-
####Locating Standard in the SDLC
91
+
### Locating Standard in the SDLC
91
92
92
93
Where is Standard located in the big picture?
93
94
@@ -108,7 +109,7 @@ Therefore, we make a distinction between:
We can devise an implementation of a CI which, by querying Paisano's Registry, autonomously discovers all work that needs to be done.
164
-
Indeed, we made a reference implementation for GitHub Actions over at [`divnix/std-action`](https://github.com/divnix/paisano).
165
+
In order to demonstrate the value of this proposition, we made a reference implementation for GitHub Actions over at [`divnix/std-action`](https://github.com/divnix/paisano).
165
166
To our knowledge, this is the first and only "zero config" CI implementation based on the principles of artifact typing and code organization.
166
-
By using these principles rather than a rigid opinionated structure, it also remains highly flexible and adapts well to the user's preferences.
167
+
By using these principles rather than a rigid opinionated structure, it also remains highly flexible and adapts well to the user's preferences & needs.
167
168
168
169
In summary, all these organization and typing principles enable:
169
170
170
-
-Easy refactoring of your repository's devops namespace
171
-
-Intuitive grouping of functionality that encourages well-defined internal boundaries
172
-
-Allowing for keeping your automation code clean and maintainable
173
-
-Making use of Block Types and the shared library to implement the DRY principle
174
-
-Reasoning about the content of your repo through structured data
175
-
-Thereby interesting user interfaces, such as a CLI, TUI or even a UI
176
-
-As well as also services like a (close to) zero config, self-updating CI
177
-
-Similar organizational principles help to lower the cost of context switching between different projects
171
+
-easy refactoring of your repository's devops namespace;
172
+
-intuitive grouping of functionality that encourages well-defined internal boundaries,
173
+
-allowing for keeping your automation code clean and maintainable;
174
+
-making use of Block Types and the shared library to implement the DRY principle;
175
+
-reasoning about the content of your repo through structured data,
176
+
-and, thereby, facilitate interesting user interfaces, such as a CLI, TUI or even a UI,
177
+
-as well as services like a (close to) zero config, self-updating CI;
178
+
-similar organizational principles help to lower the cost of context switching between different projects.
178
179
179
180
### Standard's Block Types (DevOps Type System)
180
181
181
182
As mentioned above, Standard exploits the Block Type abstraction to provide artifact types for the SDLC.
182
183
Within the semantics of each Block Type, we implement shared functionality.
183
184
This is designed to offer the user an optimized, audited implementation.
184
-
Alleviates the burdon of devising "yet another" local implementation of otherwise well-understood generic functionality, such as, the building of a package or the pushing of a container image.
185
+
Alleviates the burden of devising "yet another" local implementation of otherwise well-understood generic functionality, such as, the building of a package or the pushing of a container image.
185
186
186
187
### Standard's Cells (Function Library)
187
188
@@ -191,4 +192,5 @@ While optional, an audited and community maintained function library and its cor
191
192
## Modularity & Virality Model
192
193
193
194
We aim to provide a public registry in which we index and aggregate additional Block Types and Cells from the Standard user community that are not maintained in-tree.
194
-
A good documentation story will be part of that registry.
195
+
To boost its value, aggregate documentation will be part of that registry.
196
+
We need to decide on how to deeply integrate documentation concerns, such as structured docstrings & adjacent readmes, into the framework.
Copy file name to clipboardExpand all lines: COMPARE.md
+35-12Lines changed: 35 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,53 @@ _Where appropriate, we compare with `divnix/paisano`, instead_.
6
6
7
7
### flake-utils
8
8
9
-
`numtide/flake-utils` is a small & lightweight utility with a focus on generating flake file _outputs_ in accordance with the packaging use case built into the Nix CLI tooling.
9
+
`numtide/flake-utils` is a small & lightweight utility with a focus on generating flake file _outputs_ in accordance with the packaging and NixOS use cases built into the Nix CLI tooling.
10
10
11
-
Paisano, in turn, is an importer with a focus on _code organization_; it still plugs well into a `flake.nix` file, but also preserves its index function by keeping it clean.
12
-
While you _can_ use it to match the schema that Nix CLI expects, it also enables more flexibility as it is not specially optimized for the Nix _package manager use case_.
11
+
Paisano, in turn, is an importer with a focus on _code organization_.
12
+
13
+
Like Flake Utils, it, too, was designed to be used inside the `flake.nix` file.
14
+
However, `flake.nix` is a repository's prime estate.
15
+
And so Paisano was optimized for keeping that estate as clean as possible and, at the same time, beeing a useful table of content even to a relative nix-layman.
16
+
17
+
While you _can_ use it to match the schema that Nix CLI expects, it also enables more flexibility as it is not specially optimized for any particular use case.
13
18
14
19
### flake-parts
15
20
16
21
`hercules-ci/flake-parts` is a component aggregator with a focus on a flake schema that is built into the Nix CLI tooling that makes use of the NixOS module system for composability and aggregation.
17
22
18
23
Paisano, in turn, is an importer with a focus on _code organization_; it still plugs well into a `flake.nix` file, but also preserves its index function by keeping it clean.
19
-
While you _can_ use it to match the schema that Nix CLI expects, it also enables more flexibility as it is not specially optimized for the Nix _package manager use case_.
24
+
While you _can_ use it to match the schema that Nix CLI expects, it also enables more flexibility as it is not specially optimized for any particular use case.
20
25
21
26
To a lesser extent, Paisano is also a component aggregator for your flake outputs.
22
27
However, in that role, it gives you back the freedom to use the output schema that best fits your problem domain.
23
28
24
-
Convergence towards the Flakes output schema is provided via the harvester family of functions (`winnow`, `harvest` & `pick`).
25
-
Depending on the domain schema, it can be a _lossy_ convergence due the lesser expressivity of the flake output schema.
26
-
27
-
Flake Parts aggregates bespoke use-case specific interfaces implemented in a domain specific language based on Nix (i.e. "the module system").
28
-
Paisano, in turn, focuses on code organization along high level code boundaries connected by generic interfaces.
29
-
30
29
The core tenet of Flake Parts is domain specific interfaces for each use case.
30
+
Flake Parts implements and aggregates these interfaces based on the NixOS module system.
31
31
32
-
The core tenet of Paisano remains Nix' original functional style paired with a function library.
32
+
Paisano, in turn, focuses on code organization along high level code boundaries connected by generic interfaces.
33
+
The core tenet of Paisano remains Nix's original functional style.
34
+
35
+
Convergence towards the Flakes output schema is provided via the harvester family of utility functions (`winnow`, `harvest` & `pick`).
36
+
Depending on the domain schema, it can be a _lossy_ convergence, though, due the lesser expressivity of the flake output schema.
37
+
38
+
<details>
39
+
<summary>Example usage of harvester functions</summary>
@@ -51,4 +74,4 @@ Currently it has more advanced build caching strategies: a gap that the Nix comm
51
74
### My CI/CD
52
75
53
76
Any CI can leverage Paisano's Registry to discover work.
54
-
Implementations can either be native to the CI or provided via CI-specific wrappers, a strategy chosen for example by our reference implementation for GitHub Actions.
77
+
Implementations can either be native to the CI or provided via CI-specific wrappers, a strategy chosen, for example, by our reference implementation for GitHub Actions.
0 commit comments