work on technical-principles.md

This commit is contained in:
Douze Bé 2024-09-30 16:20:26 +02:00
parent 2c0e68ef9c
commit a8b15ebfcb

View file

@ -1,28 +1,36 @@
# Technical principles # Technical principles
ToDo: intro on best practices that drive the technical choices
## KISS principle ## KISS principle
"Keep it simple, stupid!" "Keep it simple, stupid!"
## Do not reinvent the wheel ## Do not reinvent the wheel
ToDo: nixos
ToDo: passwordstore
ToDo: krops
## There is only one timezone ## There is only one timezone
Experience has shown that using multiple time-zones for the servers of an infrastructure is a recipe for disaster. Experience has shown that using multiple time-zones for the servers of an infrastructure is a recipe for disaster.
Also, using the timezone of one country for an international project is a source of confusion and headaches. Also, using the timezone of one country for an international project is a source of confusion and headaches.
Especially when that timezone is subject to daylight saving changes that are causing the clock to jump 1 hour forward or backward twice a year. Especially when that timezone is subject to daylight saving changes that are causing the clock to jump 1 hour forward or backward twice a year.
The only sensible choice is to set the servers time to UTC and to transalte the timestamps to the user's timezone when displaying them. The only sensible choice is to set the servers time to UTC and to transalte the timestamps to the user's timezone when displaying them on an interface.
This is strongly opinion based. And we may not not all agree on the subject. This is why we will make sure that it is easy for the users to choose their prefered timezone for setting up their servers. This is strongly opinion based. We may not not all agree on the subject. This is why we will make sure that it is easy for the users to choose their prefered timezone for setting up their servers.
## Eat your own food ## Eat your own dog food
The project is bootstrapped using a hosting infrastructure thagtis based on Proxmox, Debian and YunoHost. The project is bootstrapped using an infrastructure that is based on Proxmox, Debian and YunoHost for hosting its website and git forge.
But the goal is to host the project using itself as soon as possible. That is using NixOS servers managed with the tools and principles developed by the NixiN project.
Currently only the forgejo action runners used for CI/CD are hosted on NixOS servers. Currently only the forgejo action runners used for CI/CD are hosted on NixOS servers.
But the goal is to host the whole project using itself as soon as possible. That is using NixOS servers managed with the tools and principles developed within the NixiN project.
## CI/CD ## CI/CD
## Focus on user experience ## Focus on user experience
## Prioritize security ## Prioritize security
ToDo: only open ports that are strictily necessary on the public interface. go through a VPN for everything else
ToDo: use fail2ban or reaction
ToDo: passwords manager
## No premature performance optimization ## No premature performance optimization
Use best practices to write efficient code but do not write overly complicated solutions based on a-priori thinking of performance issue. Use best practices to write efficient code but do not write overly complicated solutions based on a-priori thinking of performance issue.
@ -32,3 +40,9 @@ Only optimize what has been tested to be an issue.
Even though we think that Rust would be a better language for developing the tools of the project we are starting the first version using Go because it is faster to develop with it and easier to find contributors with this languages. Even though we think that Rust would be a better language for developing the tools of the project we are starting the first version using Go because it is faster to develop with it and easier to find contributors with this languages.
## ToDo
favor modern filesystems with snapshoting capability like zfs and btrfs
## To flake or not to flake?
There is a bit of controversy around flakes. They bring some intereting convenience when using NixOS and have spawned an extensive ecosystem. But they are not without drawbacks. We have decided to not use flakes for now. But we'll keep our architecture open for the users who want to use them.