mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
217 lines
6.8 KiB
Plaintext
217 lines
6.8 KiB
Plaintext
digraph architecture {
|
|
label="Sourcegraph Architecture Overview\n\nBox => horizontally scalable service, Rectangle => singleton service"
|
|
rankdir=LR
|
|
ratio=fill
|
|
ranksep=0.8
|
|
nodesep=0.4
|
|
compound=true
|
|
splines=ortho
|
|
concentrate=true
|
|
stylesheet="./architecture.css"
|
|
|
|
graph [
|
|
fontname="Source Code Pro, monospace"
|
|
fontsize=12
|
|
pad=0.2
|
|
]
|
|
|
|
node [
|
|
colorscheme="set312"
|
|
style="filled"
|
|
fillcolor="white"
|
|
shape="rectangle"
|
|
fontname="Source Code Pro, monospace"
|
|
fontsize=10
|
|
margin=0.15
|
|
target="_blank"
|
|
]
|
|
|
|
edge [
|
|
colorscheme="set312"
|
|
penwidth=0.6
|
|
arrowtail=invis
|
|
arrowsize=1.35
|
|
]
|
|
|
|
subgraph cluster_clients {
|
|
label="Clients"
|
|
graph [style="dotted"]
|
|
node [
|
|
shape="circle"
|
|
fixedsize="true"
|
|
width="1.1"
|
|
fillcolor="#fff0d0"
|
|
]
|
|
|
|
web_app [label="Web App\n(SPA)" URL="https://github.com/sourcegraph/sourcegraph/tree/main/client/web"]
|
|
browser_ext [label="Browser\nExtensions" URL="https://github.com/sourcegraph/sourcegraph/tree/main/client/browser/"]
|
|
src_cli [label="src-cli" URL="https://github.com/sourcegraph/src-cli"]
|
|
native_integrations [label="Native\nIntegrations"]
|
|
editor_ext [label="Editor\nExtensions"]
|
|
customer_scripts [label="Customer\nScripts"]
|
|
}
|
|
|
|
subgraph cluster_services {
|
|
label="K8s"
|
|
graph [style="dotted"]
|
|
|
|
frontend [
|
|
fixedsize=true
|
|
width=1.2
|
|
height=1.2
|
|
shape="box3d"
|
|
label="frontend"
|
|
fillcolor="#7e78dc"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/frontend"
|
|
]
|
|
|
|
worker [
|
|
label="worker"
|
|
fillcolor="#22ffff"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/worker"
|
|
]
|
|
|
|
subgraph cluster_search {
|
|
label="Search"
|
|
graph [style="dotted"]
|
|
node [fillcolor="#ccaaff"]
|
|
|
|
subgraph cluster_zoekt {
|
|
label="Indexed search"
|
|
graph [style="dotted"]
|
|
node [shape="box3d"]
|
|
|
|
zoekt_webserver [
|
|
label="zoekt webserver"
|
|
fillcolor="#ccaaff"
|
|
URL="https://github.com/sourcegraph/zoekt/tree/master/cmd/zoekt-webserver"
|
|
]
|
|
zoekt_indexserver [
|
|
label="zoekt indexserver"
|
|
fillcolor="#aaccff"
|
|
URL="https://github.com/sourcegraph/zoekt/tree/master/cmd/zoekt-sourcegraph-indexserver"
|
|
]
|
|
}
|
|
|
|
searcher [
|
|
label="searcher"
|
|
shape="box3d"
|
|
fillcolor="#e2a8fd"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/searcher"
|
|
]
|
|
}
|
|
|
|
subgraph cluster_code_intelligence {
|
|
label="Code intelligence"
|
|
graph [style="dotted"]
|
|
|
|
codeintel_worker [
|
|
label="precise-code-intel-worker"
|
|
shape="box3d"
|
|
fillcolor="#eac1c1"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/precise-code-intel-worker"
|
|
]
|
|
|
|
symbols [
|
|
label="symbols"
|
|
shape="box3d"
|
|
fillcolor="#c1eaea"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/symbols"
|
|
]
|
|
}
|
|
|
|
gitserver [
|
|
label="gitserver"
|
|
fillcolor="#cd5c5c"
|
|
shape="box3d"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/gitserver"
|
|
]
|
|
|
|
repo_updater [
|
|
label="repo updater"
|
|
fillcolor="#05a167"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/repo-updater"
|
|
]
|
|
|
|
syntect_server [
|
|
label="syntect\nserver"
|
|
fillcolor="#cc0085"
|
|
shape="box3d"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/docker-images/syntax-highlighter"
|
|
]
|
|
}
|
|
|
|
subgraph cluster_third_party {
|
|
label="Managed services"
|
|
graph [style="dotted"]
|
|
|
|
redis [label="redis", shape="octagon"]
|
|
blob_store [label="blob store", shape="folder"]
|
|
|
|
subgraph cluster_databases {
|
|
label="Postgres"
|
|
graph [style="dotted"]
|
|
node [shape="cylinder"]
|
|
|
|
postgres [label="frontend db"]
|
|
codeintel_db [label="codeintel db"]
|
|
codeinsights_db [label="codeinsights db"]
|
|
}
|
|
}
|
|
|
|
subgraph cluster_external_precise_code_intel {
|
|
label="External services (on raw compute nodes)"
|
|
graph [style="dotted"]
|
|
|
|
executor [
|
|
label="executor"
|
|
shape="box3d"
|
|
fillcolor="#0dc9b6"
|
|
URL="https://github.com/sourcegraph/sourcegraph/tree/main/cmd/executor"
|
|
]
|
|
}
|
|
|
|
subgraph cluster_codehosts {
|
|
label="Code hosts"
|
|
graph [style="dotted"]
|
|
node [
|
|
shape="circle"
|
|
fixedsize="true"
|
|
width="1.1"
|
|
fillcolor="#fff0d0"
|
|
]
|
|
|
|
github_dot_com [label="github.com"]
|
|
gitlab_dot_com [label="gitlab.com"]
|
|
bitbucket_cloud [label="bitbucket.org"]
|
|
github_enterprise [label="GitHub\nEnterprise"]
|
|
bitbucket_server [label="Bitbucket\nServer"]
|
|
}
|
|
|
|
/* To/from external services */
|
|
web_app -> frontend[ltail=cluster_clients, fillcolor="#fff0d0"]
|
|
gitserver -> {bitbucket_server} [lhead=cluster_codehosts, fillcolor="#cd5c5c"]
|
|
repo_updater -> {bitbucket_server} [lhead=cluster_codehosts, fillcolor="#05a167"]
|
|
|
|
/* To databases */
|
|
frontend -> {postgres, codeintel_db, codeinsights_db} [fillcolor="#7e78dc"]
|
|
frontend -> {redis} [fillcolor="#7e78dc"]
|
|
worker -> {postgres, codeintel_db, codeinsights_db} [fillcolor="#22ffff"]
|
|
codeintel_worker -> {postgres, codeintel_db} [ fillcolor="#eac1c1"]
|
|
|
|
/* Internal routes */
|
|
frontend -> {searcher, symbols, blob_store, gitserver, repo_updater, zoekt_webserver, syntect_server} [fillcolor="#7e78dc"]
|
|
searcher -> {gitserver, zoekt_webserver} [fillcolor="#e2a8fd"]
|
|
symbols -> gitserver [fillcolor="#c1eaea"]
|
|
zoekt_indexserver -> {frontend, gitserver} [fillcolor="#aaccff"]
|
|
worker -> {gitserver} [fillcolor="#22ffff"]
|
|
codeintel_worker -> {gitserver} [fillcolor="#eac1c1"]
|
|
executor -> frontend [fillcolor="#0dc9b6"]
|
|
|
|
/* Unconstrained internal routes */
|
|
codeintel_worker -> {blob_store} [fillcolor="#eac1c1", constraint=false]
|
|
gitserver -> {github_dot_com} [fillcolor="#cd5c5c", constraint=false]
|
|
repo_updater -> {github_dot_com} [fillcolor="#05a167"]
|
|
repo_updater -> {postgres} [fillcolor="#05a167", constraint=false]
|
|
}
|