Skip to content

Too much "over-abstraction" in early version. #4

@waterflier

Description

@waterflier

We are still in the early stages, and the number of lines of code I envision should be much fewer than what we have now. From an abstract perspective, one important consideration is to focus on what parts of the system are likely to change. We only need to make appropriate abstractions for things that might change, rather than making all "concepts" extensible at once. Doing so would greatly increase the complexity of the system and obscure its core issues. This reminds me of some terrifying meetings in the past, dominated by Java frameworks: reading the code made it almost impossible to intuitively understand any flow, because every function was just an interface definition. After half an hour of reading, I still didn't understand "how the system iterates or safely completes a backup task with exception handling."

From the perspective of our goals, the core design of the backup_suite is to solve the following key issues:

  • BackupTarget is extensible (this is the main direction of extension).
  • The extensibility of BackupSource is limited; implementing one LocalDirSource should be almost sufficient.
  • task_mgr / engine hardly needs to be extended. Most of the other components in the system are passive components, and task_mgr should act as a driver, managing various details and processes (it doesn't always have to be elegant). This will clarify the boundaries of other components, and we can refactor this gradually.
  • Meta (the name isn't great, it's too generic; I understand it as BackupTaskDb) doesn't need to be considered for extensibility. As long as correctness is ensured, implementing one based on MetaDB is enough.
  • Integration with buckyos. I understand that many of the extensibility designs in Meta are for future integration with buckyos, but I don't think it's necessary to think about that at this early stage. We should focus on building a solid and standalone backup product first. A simple and reliable implementation can be easily reused in another system.

Keeping things simple is not easy. It requires a deep understanding of the system's critical complexities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions