It is suggested to split the system in smaller components and adopt different best-practices for each specific part to avoid duplication.
: There is no simple solution. Many partial solutions is the way to go. Split the system in smaller components. Adopt different best-practices for each specific part.