{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/43519086","id":43519086,"diff_hunk":"@@ -0,0 +1,29 @@\n+# Architecture \n+Kubernetes Console project consists of two main components. They are called here the\n+frontend and the backend.\n+\n+The frontend is a single page web application that runs in a browser. It fetches all its\n+business data from the backend using standard HTTP methods. It does not implement business logic;\n+it only presents fetched data and sends requests to the backend for actions.\n+\n+The backend runs in a Kubernetes cluster as a kubernetes service. Alternatively, it may run anywhere\n+outside of the cluster, given that it can connect to the master. The backend is a HTTP server that\n+proxies data requests to appropriate remote backends (e.g., k8s apiserver or heapster) or implements\n+business logic. The backend implements business logic when remote backends APIs do not\n+support required use case directly, e.g., “get a list of pods with their CPU usage metric\n+timeline”. Figure 1 outlines the architecture of the project.\n+\n+![Architecture Overview](architecture.png?raw=true \"Architecture overview\")\n+\n+*Figure 1: Project architecture overview*\n+\n+Rationale for having a backend that implements business logic:\n+\n+* Clear separation between the presentation layer (frontend) and business logic layer (backend).\n+This is because every action goes through well defined API.","path":"docs/design/architecture.md","position":23,"original_position":23,"commit_id":"baaf39f1d1eb5573436fd6eaf7ad5a1a217e3c40","original_commit_id":"baaf39f1d1eb5573436fd6eaf7ad5a1a217e3c40","user":{"login":"bryk","id":1159999,"avatar_url":"https://avatars.githubusercontent.com/u/1159999?v=3","gravatar_id":"","url":"https://api.github.com/users/bryk","html_url":"https://github.com/bryk","followers_url":"https://api.github.com/users/bryk/followers","following_url":"https://api.github.com/users/bryk/following{/other_user}","gists_url":"https://api.github.com/users/bryk/gists{/gist_id}","starred_url":"https://api.github.com/users/bryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryk/subscriptions","organizations_url":"https://api.github.com/users/bryk/orgs","repos_url":"https://api.github.com/users/bryk/repos","events_url":"https://api.github.com/users/bryk/events{/privacy}","received_events_url":"https://api.github.com/users/bryk/received_events","type":"User","site_admin":false},"body":"Private API only for backend<->frontend communication. It has to be well defined, though. As every API.","created_at":"2015-10-30T16:00:51Z","updated_at":"2015-10-30T16:00:51Z","html_url":"https://github.com/kubernetes/dashboard/pull/32#discussion_r43519086","pull_request_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/43519086"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/32#discussion_r43519086"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/32","id":49010300,"html_url":"https://github.com/kubernetes/dashboard/pull/32","diff_url":"https://github.com/kubernetes/dashboard/pull/32.diff","patch_url":"https://github.com/kubernetes/dashboard/pull/32.patch","issue_url":"https://api.github.com/repos/kubernetes/dashboard/issues/32","number":32,"state":"open","locked":false,"title":"Project architecture design document","user":{"login":"bryk","id":1159999,"avatar_url":"https://avatars.githubusercontent.com/u/1159999?v=3","gravatar_id":"","url":"https://api.github.com/users/bryk","html_url":"https://github.com/bryk","followers_url":"https://api.github.com/users/bryk/followers","following_url":"https://api.github.com/users/bryk/following{/other_user}","gists_url":"https://api.github.com/users/bryk/gists{/gist_id}","starred_url":"https://api.github.com/users/bryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryk/subscriptions","organizations_url":"https://api.github.com/users/bryk/orgs","repos_url":"https://api.github.com/users/bryk/repos","events_url":"https://api.github.com/users/bryk/events{/privacy}","received_events_url":"https://api.github.com/users/bryk/received_events","type":"User","site_admin":false},"body":"This is architecture proposal for MVP version of the product. When MVP\r\nis done it'll be revisited to verify whether it (still) works well.","created_at":"2015-10-28T14:09:25Z","updated_at":"2015-10-30T16:00:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9c3febf0ffcae70477e4fed2e263027b4b022c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/32/commits","review_comments_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/32/comments","review_comment_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/issues/32/comments","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/baaf39f1d1eb5573436fd6eaf7ad5a1a217e3c40","head":{"label":"kubernetes:architecture-design-doc","ref":"architecture-design-doc","sha":"baaf39f1d1eb5573436fd6eaf7ad5a1a217e3c40","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":44350607,"name":"dashboard","full_name":"kubernetes/dashboard","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/dashboard","description":"","fork":false,"url":"https://api.github.com/repos/kubernetes/dashboard","forks_url":"https://api.github.com/repos/kubernetes/dashboard/forks","keys_url":"https://api.github.com/repos/kubernetes/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/dashboard/teams","hooks_url":"https://api.github.com/repos/kubernetes/dashboard/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/dashboard/events","assignees_url":"https://api.github.com/repos/kubernetes/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/dashboard/tags","blobs_url":"https://api.github.com/repos/kubernetes/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/dashboard/languages","stargazers_url":"https://api.github.com/repos/kubernetes/dashboard/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/dashboard/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/dashboard/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/dashboard/subscription","commits_url":"https://api.github.com/repos/kubernetes/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/dashboard/merges","archive_url":"https://api.github.com/repos/kubernetes/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/dashboard/downloads","issues_url":"https://api.github.com/repos/kubernetes/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/dashboard/releases{/id}","created_at":"2015-10-15T23:09:14Z","updated_at":"2015-10-29T15:49:24Z","pushed_at":"2015-10-30T15:50:58Z","git_url":"git://github.com/kubernetes/dashboard.git","ssh_url":"git@github.com:kubernetes/dashboard.git","clone_url":"https://github.com/kubernetes/dashboard.git","svn_url":"https://github.com/kubernetes/dashboard","homepage":"","size":554,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":9,"forks":4,"open_issues":9,"watchers":10,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"c8ac166dd3c2536ed1baf4a14cf87c08326b3330","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":44350607,"name":"dashboard","full_name":"kubernetes/dashboard","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/dashboard","description":"","fork":false,"url":"https://api.github.com/repos/kubernetes/dashboard","forks_url":"https://api.github.com/repos/kubernetes/dashboard/forks","keys_url":"https://api.github.com/repos/kubernetes/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/dashboard/teams","hooks_url":"https://api.github.com/repos/kubernetes/dashboard/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/dashboard/events","assignees_url":"https://api.github.com/repos/kubernetes/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/dashboard/tags","blobs_url":"https://api.github.com/repos/kubernetes/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/dashboard/languages","stargazers_url":"https://api.github.com/repos/kubernetes/dashboard/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/dashboard/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/dashboard/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/dashboard/subscription","commits_url":"https://api.github.com/repos/kubernetes/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/dashboard/merges","archive_url":"https://api.github.com/repos/kubernetes/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/dashboard/downloads","issues_url":"https://api.github.com/repos/kubernetes/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/dashboard/releases{/id}","created_at":"2015-10-15T23:09:14Z","updated_at":"2015-10-29T15:49:24Z","pushed_at":"2015-10-30T15:50:58Z","git_url":"git://github.com/kubernetes/dashboard.git","ssh_url":"git@github.com:kubernetes/dashboard.git","clone_url":"https://github.com/kubernetes/dashboard.git","svn_url":"https://github.com/kubernetes/dashboard","homepage":"","size":554,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":9,"forks":4,"open_issues":9,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/32"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/32"},"issue":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/32"},"comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/dashboard/statuses/baaf39f1d1eb5573436fd6eaf7ad5a1a217e3c40"}}}}