Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project architecture design document #32

Merged
merged 4 commits into from
Mar 15, 2016
Merged

Conversation

bryk
Copy link
Contributor

@bryk bryk commented Oct 28, 2015

This is architecture proposal for MVP version of the product. When MVP
is done it'll be revisited to verify whether it (still) works well.


This change is Reviewable

bryk added 2 commits October 28, 2015 15:02
This is architecture proposal for MVP version of the product. When MVP
is done it'll be revisited to verify whether it (still) works well.
@bryk bryk mentioned this pull request Oct 28, 2015
@bryk
Copy link
Contributor Author

bryk commented Oct 28, 2015

@bgrant0607 @PeWu @mgr01 @gmarek @jwforres @lavalamp @jimmidyson @preillyme @emacias

CCing folks that expressed interest in this project and its architecture.

@bgrant0607
Copy link
Member

LGTM

@jimmidyson
Copy link
Member

👍

@satoshi75nakamoto
Copy link

LGTM

Rationale for having a backend that implements business logic:

* Clear separation between the presentation layer (frontend) and business logic layer (backend).
This is because every action goes through well defined API.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a new API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private API only for backend<->frontend communication. It has to be well defined, though. As every API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you expect the frontend and backend to be deployed together in the same pod? That would make upgrades simpler.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC the next paragraph frontend will run in browser.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan is to have everything in a single package running in a single pod. In the pod, backend serves JavaScript frontend to the user and then the browser JavaScript communicates with the backend.

@jwforres
Copy link

cc @smarterclayton

The backend runs in a Kubernetes cluster as a kubernetes service. Alternatively, it may run anywhere
outside of the cluster, given that it can connect to the master. The backend is a HTTP server that
proxies data requests to appropriate remote backends (e.g., k8s apiserver or heapster) or implements
business logic. The backend implements business logic when remote backends APIs do not

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead shouldn't we be pushing back on the api to support the use cases consoles want/need so that everyone can benefit from it instead of writing one-off versions just for kube dashboard?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, though that takes longer.

A Go server could also reuse our client-side caching library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's worth trying other caching solutions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwforres Yes, changes to API should be pushed whenever possible. The UI will, however, contain business logic, no matter what is in the API. We need to place the business logic somewhere and Go backend is a good place for it.

You might as, why business logic in the UI? Imagine a page that displays services, replication controllers and pods at the same time. The data has to be fetched from the apiserver with multiple requests, then joined and then perhaps processed. This is business logic the UI will have.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relevant:
kubernetes/kubernetes#12143
kubernetes/kubernetes#7311

So far, nobody has had the time to move these forward, unfortunately.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than Deployment.

@bryk
Copy link
Contributor Author

bryk commented Mar 15, 2016

Merging this, as this is the architecture we ended with.

bryk added a commit that referenced this pull request Mar 15, 2016
@bryk bryk merged commit 4857aa4 into master Mar 15, 2016
@bryk bryk deleted the architecture-design-doc branch March 15, 2016 11:05
anvithks pushed a commit to anvithks/k8s-dashboard that referenced this pull request Apr 10, 2020
Fixed project name. changed primeng to opensds-dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants