Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the github website work (architecture)? [closed]

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?

like image 346
Phillip B Oldham Avatar asked Feb 03 '11 22:02

Phillip B Oldham


People also ask

What is the architecture of GitHub?

Because of that, GitHub's architecture is deeply rooted in Ruby on Rails. Throughout the company's history, we have employed some of the world's best Ruby developers to help us scale and optimize our code base.

Is GitHub website open-source?

GitHub is not open source. Pragmatically, this doesn't make much of a difference to most users. The vast majority of code put onto GitHub is, presumably, encouraged to be shared by everyone, so GitHub's primary function is a sort of public backup service.

What is the main architectural feature of Git?

Git uses a three-tree architecture It still has the repository and the working copy, but in between is another tree, which is the staging index.

What technology does GitHub use?

The core of what you see and use as a GitHub user is a Ruby on Rails application. It's seven-year-old app now, created by founders when they started the company. That's the core of the application, but obviously there's a ton of Git in the stack.


1 Answers

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?)

GitLab system layout diagram

like image 60
Huang Tao Avatar answered Oct 02 '22 12:10

Huang Tao