问题
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?
回答1:
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.
However, Github is proprietary software, and many of it's internals remain unknown to general public.
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.
I stole a system layout diagram from Gitlab Architecture Overview. Bet you've already get a hang of how gitlab works from this diagram.
(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?)
来源:https://stackoverflow.com/questions/4892602/how-does-the-github-website-work-architecture