git github网站是如何工作的(架构)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4892602/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:00:13  来源:igfitidea点击:

How does the github website work (architecture)?

gitarchitecturediffgithub

提问by Phillip B Oldham

Github is a truly amazing service. I'm keen to understand what their architecture is like and how they fit the different pieces together; how they store the repositories, how they access those repositories to show file contents, how they handle displaying diffs, etc. Could someone give an overview of the technologies and techniques they use, so I can study them to expand my knowledge and in turn skills?

Github 是一项真正了不起的服务。我很想了解他们的架构是什么样的,以及他们如何将不同的部分组合在一起;他们如何存储存储库,他们如何访问这些存储库以显示文件内容,他们如何处理显示差异等。有人可以概述他们使用的技术和技巧,以便我可以研究它们以扩展我的知识和技能?

采纳答案by Huang Tao

The core of Github is the open-source software git, which is a distributed version control and source code management software. Github adds many features onto git's functionality, including issue tracking, wiki, access control, etc.

Github 的核心是开源软件git,它是一个分布式版本控制和源代码管理软件。Github 在git的功能上添加了许多特性,包括问题跟踪、维基、访问控制等。

However, Github is proprietary software, and many of it's internals remain unknown to general public.

然而,Github 是专有软件,它的许多内部结构仍然不为公众所知。

In order to find out how pieces are fit together, I suggest following the leads below:

为了找出各个部分如何组合在一起,我建议遵循以下线索:

  • Github's official Engineering Blog, which covers a wide range of topics of the design of the platform.
    • especially this article, an extensive overview written by Github CTO.
  • Projects that power Github, an officially curated list of open-source projects that power Github. Here are a few highlights:
    • rails - web backend
    • jekyll - blog engine behind Github Pages
    • elasticsearch - search engine
    • hubot - a chat bot for task automation
    • ace - browswer based code editor
    • d3 - js lib for graphs and charts
    • resque - background works
  • GitLab, an open-source alternative to Github, which offers pretty much the same functionalities.
    • Read the source code of GitLab and you'll get to know how GitLab (and Github as well) works under the hood.
    • GitLab Architecture Overview. This article is definitely a good entry point.
  • Github 的官方工程博客,涵盖了平台设计的广泛主题。
    • 特别是这篇文章,由 Github CTO 撰写的广泛概述。
  • 支持 Github 的项目,官方策划的支持Github的开源项目列表。这里有几个亮点:
    • rails - 网络后端
    • jekyll - Github Pages背后的博客引擎
    • elasticsearch - 搜索引擎
    • hubot - 用于任务自动化的聊天机器人
    • ace - 基于浏览器的代码编辑器
    • d3 - 用于图形和图表的 js 库
    • resque - 背景作品
  • GitLab是 Github 的开源替代品,它提供了几乎相同的功能。
    • 阅读 GitLab 的源代码,您将了解 GitLab(以及 Github)的工作原理。
    • 亚搏体育应用架构概述。这篇文章绝对是一个很好的切入点。

I stole a system layout diagram from Gitlab Architecture Overview. Bet you've already get a hang of how gitlab works from this diagram.

我从Gitlab 架构概览中偷了一张系统布局图。打赌您已经从这张图中了解了 gitlab 的工作原理。

(There surely are lots of difference between Github and GitLab. But an open-source project is always better for someone who wants to learn, isn't it?)

(Github 和 GitLab 之间肯定有很多区别。但是对于想要学习的人来说,开源项目总是更好,不是吗?)

GitLab system layout diagram

GitLab 系统布局图