Closed evomimic closed 2 years ago
Failure to encapsulate technology choices can lead to proliferation of unwanted dependencies at all levels of the architecture, making swapping out the technology choice expensive. This might seem an odd thing to worry about for a prototype. Expending a lot of energy on tech encapsulation can lead to unnecessary complexity and over-engineering of code that may end up just being discarded.
However, in this particular prototype, one of the things we are playing with and hoping to learn about relates directly to code structuring and approaches to separation of concerns that can provide an evolvable structure to the MAP going forward.
Holochain technology impacts two very different aspects of the MAP architecture:
The code structure (folder hierarchy, packaging) should align to the application architecture. Most holochain repos push coordinator and integrity zome distinctions very high in the repo structure.
Should we following more conventional naming (e.g., mid-tier, controllers, model, etc.) or follow the holochain distinctions of zomes (coordinator and integrity)?
DECISIONS:
**_1. Isolate client/mid-tier code from dependencies on holochain in persistence layer.
RATIONALE: For decision (1), some types of data may benefit from a different persistence technology (even if we retain holochain Conductor as overall execution environment). So its worth isolating, even if the likelihood of dropping holochain as a primary technology for the MAP is quite low.
For decision (2), aligning with standard holochain practice makes it easier for others to understand and provide feedback on our code and allows us to leverage available tooling (e.g., hc_scaffold tool). This feels more important than reducing the difficulty of switching out holochain Conductor as container.
Should we try to isolate dependencies in our code on specific technology choices to make it easier to change those choices later?