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

Implement friendly UI #60

Open
2 tasks
KSAlpha opened this issue May 13, 2019 · 12 comments
Open
2 tasks

Implement friendly UI #60

KSAlpha opened this issue May 13, 2019 · 12 comments
Labels
enhancement General improvements new feature New features to develop
Milestone

Comments

@KSAlpha
Copy link
Member

KSAlpha commented May 13, 2019

  • Better CLI interface
  • New web based interface
@KSAlpha KSAlpha added new feature New features to develop enhancement General improvements labels May 13, 2019
@KSAlpha KSAlpha mentioned this issue May 13, 2019
@KSAlpha KSAlpha added this to the 0.1.0 milestone May 13, 2019
@Qwaz
Copy link
Member

Qwaz commented May 17, 2019

In last year's DEF CON, ultimately none of our team member except Owl dev team wanted to learn how to use Owl :/

@Qwaz
Copy link
Member

Qwaz commented May 17, 2019

For this reason, I demand a decent GUI for Soma. Possible technical stacks that I can imagine of are:

  1. Keep tarpc, build a Desktop GUI with conrod, azul, or some Qt binding library.
  2. Replace tarpc with a webserver, build a web-based GUI
    2-1. Webserver choices: actix-web, rocket, or something else
    2-2. Protocol choices: RESTful or GraphQL
    2-2. Client-side choices: React or Yew

In any of this situation, I think the current database stack with PostgreSQL + Diesel is fine to use. If we are not gonna keep tarpc, this decision will affect #58 and #44.

@KSAlpha
Copy link
Member Author

KSAlpha commented May 20, 2019

In terms of refactoring step, first one is a better choice. It will relatively require a smaller rework on the code. However, building a destop GUI will be a very hard work. Also, it should target nightly until the 1.37 release (i.e., async/await stabilization).

In terms of reusability, second one seems to be a better choice. This is a very efficient design choice which is also used in Docker. Also, we can target stable right now. But, it will result in bigger rewrite of the code.

I am in favor of the second one. What do you think?

@Qwaz
Copy link
Member

Qwaz commented May 20, 2019

I'm also in favor of the 2nd choice in long-term perspective. I'm especially interested in GraphQL approach, because the protocol looks that it can automagically cover a lot of our manual CLI command implementation.

Also, we may want to reconsider whether Rust is the right tool for web-based approach or not. Rust was the best possible choice when we were making RPC-based CLI tool. However, it may not be the best tool to develop a database backed webserver. Diesel felt good, but it feels like it requires too much boilerplate.

(I'm retracting this opinion)

In any of this situation, I think the current database stack with PostgreSQL + Diesel is fine to use.

@KSAlpha
Copy link
Member Author

KSAlpha commented May 20, 2019

Also, we may want to reconsider whether Rust is the right tool for web-based approach or not.

Good point. However, I think Rust is not that bad even if we use web framework. If you want to change the programming language, I would like to suggest C# or F# as candidates. Also, I want to avoid Python.

@Qwaz
Copy link
Member

Qwaz commented May 20, 2019

Also, I want to avoid Python.

I presume that you also want to avoid JS, right?

I'm not saying that Rust would be bad for this task; I'm wondering Rust might not be the best. Maybe I just want a more easier ORM like Django ORM than Diesel.

@KSAlpha
Copy link
Member Author

KSAlpha commented May 20, 2019

I'm wondering Rust might not be the best. Maybe I just want a more easier ORM like Django ORM than Diesel.

Well, you are right. In terms of database interface, Rust has a big disadvantage as we have to control most of the work (e.g., manual migration files, complex type structure of diesel-rs).

So, what would you like to do?

  1. Keep Rust as a project programming language
    Rocket, Iron, actix-web (or other web framework) and Diesel as an ORM
  2. Switch to .NET Family language (C#, F#)
    ASP.NET Core (or other web framework) and EF Core as an ORM
  3. Switch to Python
    Django (or other web framework) and Django ORM as an ORM
  4. Switch to something else

@Qwaz
Copy link
Member

Qwaz commented May 20, 2019

I need more time to properly explore possible choices, but thus far this one looks very interesting:
https://github.com/prisma/prisma

Introduction video:
https://youtu.be/nKmjKKyK5vc

It supports TypeScript, Flow, JavaScript, and Go client. This "client" term here is a little tricky, as the program that we would write is a "Prisma Client" but a "Web Server". TypeScript would be the most comfortable option for me, but I'm open to the other options.

There is a feature request for Rust client, but there is not much progress.

@Qwaz
Copy link
Member

Qwaz commented May 20, 2019

This "client" term here is a little tricky, as the program that we would write is a "Prisma Client" but a "Web Server".

It seems that we can skip the "webserver" part and build a web-based UI that talks to Prisma Server directly.

@Qwaz
Copy link
Member

Qwaz commented May 20, 2019

Oh wait, even in that case, we need a task runner on the server side.

@KSAlpha
Copy link
Member Author

KSAlpha commented May 21, 2019

I need more time to properly explore possible choices, but thus far this one looks very interesting:
https://github.com/prisma/prisma

Interesting project...

@KSAlpha
Copy link
Member Author

KSAlpha commented May 21, 2019

We consented to rewrite the whole project into another platform. Which means we have a high probability to move from Rust to another programming language.

Candidates are:

  1. Web server powered by TypeScript, Prisma as an ORM.
  2. Web server powered by C#, EF Core as an ORM.
  3. Web server powered by Rust, Diesel as an ORM.

We had a research on each candidate and the first one is considered as the strongest option.

After deciding the finalist, we will completely reorganize open issues and PRs. If we lose Rust, all related issues and PRs will be closed and replaced with a new design plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General improvements new feature New features to develop
Projects
None yet
Development

No branches or pull requests

2 participants