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

Should this webui work for both L1 and L2? #4

Closed
guanzo opened this issue Jun 20, 2022 · 3 comments
Closed

Should this webui work for both L1 and L2? #4

guanzo opened this issue Jun 20, 2022 · 3 comments

Comments

@guanzo
Copy link
Collaborator

guanzo commented Jun 20, 2022

The high level requirements of the L1 and L2 dashboards are the same: Input a FIL address and receive a dashboard.

If this project worked for both L1 and L2, it would save a significant amount of dev time compared to two different projects.

What can be shared:

  • Project infra (dependencies, tooling, build, ci/cd, etc)
  • UI code (The majority of work that needs to happen)

What will differ:

  • How the UI is loaded (in electron vs in browser with an explicit URL)
  • Some metrics may exist for L1 and not L2 or vice versa

Sharing the UI is key. The dashboards will have a consistent look and devs won't have to coordinate design across multiple repos. Stay DRY folks.

The requirements for L1/L2 will eventually diverge. I don't foresee this being a huge complication, but as an escape hatch we can always split the project into 3 folders (L1/, L2/ shared/). This way we can easily continue sharing UI code.

Thoughts?

@bajtos
Copy link
Contributor

bajtos commented Jun 21, 2022

I agree with your proposal at the high level 👍🏻

The high level requirements of the L1 and L2 dashboards are the same: Input a FIL address and receive a dashboard.

I think this is slightly more complex. We will be discussing in filecoin-saturn/L2-node#25 what to display in the dashboard, so far we have the following items:

  • Number of retrievals served.
  • Amount of FIL earned.
  • L2 Cache resource usage.
  • Bandwidth usage.

I think it's reasonable to assume that 1) both L1 and L2 nodes can provide these four stats and 2) both L1 and L2 operators will be interested in all four stats, therefore it makes sense to implement a single shared UI.

The requirements for L1/L2 will eventually diverge. I don't foresee this being a huge complication, but as an escape hatch we can always split the project into 3 folders (L1/, L2/ shared/). This way we can easily continue sharing UI code.

Maybe we can implement the UI as data driven? Depending on what data fields are returned by the L1/L2 node, we can render or hide different components of the UI?

Anyhow, I think this is far in the future and we can defer the decision until we better understand the differences in requirements for L1 and L2 UI.


Should we rename this repo to https://github.com/filecoin-project/saturn-webui then?

@bajtos
Copy link
Contributor

bajtos commented Jun 21, 2022

How the UI is loaded (in electron vs in browser with an explicit URL)

FWIW, in the current design, the Station Electron app is loading saturn-l2-webui via explicit URL at localhost.

@guanzo
Copy link
Collaborator Author

guanzo commented Jun 21, 2022

Anyhow, I think this is far in the future and we can defer the decision until we better understand the differences in requirements for L1 and L2 UI.

Yep, we'll figure it out. Let's commit to a single repo and start reaping the benefits immediately. I've renamed it.

@guanzo guanzo closed this as completed Jun 21, 2022
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

No branches or pull requests

2 participants