Jump to content

Codebase

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 46.32.127.67 (talk) at 08:06, 10 March 2016 (التطوير). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

التطوير

Distinct and monolithic codebases

Multiple projects can have separate, distinct codebases, or can have a single, shared or monolithic codebase. This is particularly the case for related projects, such as those developed within the same company. In more detail, a monolithic codebase typically entails a single repository (all the code in one place), and often a common build system or common libraries. Whether the codebase is shared or split does not depend on the system architecture and actual build results; thus, a monolithic codebase, which is related to the actual development, does not entail a monolithic system, which is related to software architecture or a single monolithic binary. As a result, a monolithic codebase may and (for large codebases) often will consist of separate components, instead of carrying only a single system or single binary; a distributed codebase (with multiple components) can be used to build a single monolithic system or even a single binary. For example, the Linux kernel is architecturally a single monolithic kernel, but it consists of separate binaries (loadable components), and is developed in multiple distributed repositories.

There are both advantages and disadvantages to a monolithic codebase, when it is compared to a distributed codebase.[1][2] Most simply, a monolithic codebase simplifies integration‍—‌changes to different components or refactoring of code between components can be done easily and atomically‍—‌and allows operations across the entire codebase, but requires a larger repository and makes it easier to introduce wide-ranging technical debt.[dubiousdiscuss] A separate codebase or a distributed codebase keeps individual repositories smaller and more manageable, enforcing at the same time separation between components, but it also requires integration between codebases (or with the main repository), and complicates changes that span multiple codebases.[3]

In terms of standards, referring to multiple codebases as "distinct" declares that there are independent implementations without shared source code and that, historically, these implementations did not evolve from a common project. This may be a way of demonstrating interoperability by showing two independent pieces of software that implement a given standard.[dubiousdiscuss]

Examples

Some notably large codebases include:

  • Google: monolithic, hundreds of millions of lines of code/over a hundred million lines of code (2011)[1][4]
  • Facebook: monolithic, 8 GB (repo 54 GB including history, 2014),[5] hundreds of thousands of files (2014)[2]
  • Linux kernel: distributed,[citation needed] over 15 million lines of code (3.10, 2013)

See also

References

  1. ^ a b "Searching for Build Debt: Experiences Managing Technical Debt at Google". Proceedings of the Third International Workshop on Managing Technical Debt. IEEE. 2012. pp. 1–6, (PDF). {{cite conference}}: External link in |postscript= (help); Unknown parameter |authors= ignored (help); Unknown parameter |booktitle= ignored (|book-title= suggested) (help)CS1 maint: postscript (link)
  2. ^ a b Scaling Mercurial at Facebook
  3. ^ 5.1 Distributed Git - Distributed Workflows
  4. ^ Build in the Cloud: Accessing Source Code
  5. ^ Facebook's git repo is 54 GB.