apache / incubator-streampark

Make stream processing easier! Easy-to-use streaming application development framework and operation platform.
https://streampark.apache.org/
Apache License 2.0
3.85k stars 990 forks source link

[Proposal] Support team feature #1629

Closed 1996fanrui closed 1 month ago

1996fanrui commented 1 year ago

Code of Conduct

Task list

Search before asking

Describe the proposal

Background:

Currently, StreamPark doesn't support team, so all projects and applications will be showed in the same pages. For some companies, there are too many departments or teams. For ease of use and security, they shouldn't view the applicaton list of other teams.

Solution

Support the team feature, the team as the workspace in the WebUI.

User needs to choose a team first.

image

The relationship between app, project and team

Database table: t_flink_app and t_flink_project, they're old tables, we need to add the new filed team_id. These 2 tables need to add index for team_id, because WebUI usually query app or project list by teamId.

image image

Team management

Create/Modify/Delete/View team information.

Database table: t_team, it's a new table. We need to create a default team.

image

Member management

Add a Member management page, and the features are as follows:

Database table: t_user_role, it's an old table, we need to add the new filed: team_id.

image

Note:

Note: User must choose the team in 3 pages: Application, Project and Member Management.

Role management

We just set whether new user is system admin during creating a new user. The other roles will be management in the team management page.

Note: System admin is the super admin for all teams.

Database table: t_user, it's an old table, we need to add the new filed: user_type.

Database table: t_role, it's an old table, we need to add a new role: team_admin. It will be the super admin inside team(manage team members, operate all apps and projects).

image

Compatibility mechanism:

ER model

The fields highlighted in the diagram are relational fields.

Team Management ER HL

Are you willing to submit PR?

1996fanrui commented 1 year ago

Hi @wolfboys , I have sorted out the team feature. Please help take a look in your free time, thanks a lot.

If it's ok, I will start develop the backend code, and try to develop front end. I will let you know, if I need your help.

lvshaokang commented 1 year ago

Hi @1996fanrui, Thanks for you feedback! This is a nice proposal.  Could you offer the ER model about the team feature to describe their relation in more detail?

1996fanrui commented 1 year ago

Hi @lvshaokang , thanks for your nice suggestion, I have updated the ER model, PTAL in your free time, thanks a lot~

wolfboys commented 1 year ago

It looks good, The team here is actually the concept of workspace. There are a few issues that need to be clarified 1) one project or job only belong to one team? 2) What is the affiliation between users and teams, one to one? 3) Do we need an association table between team and user (team and job)?

1996fanrui commented 1 year ago

It looks good, The team here is actually the concept of workspace. There are a few issues that need to be clarified

@wolfboys , thank you for reviewing the solution. I have updated the doc for these questions.

  1. one project or job only belong to one team?
  1. What is the affiliation between users and teams, one to one?
  1. Do we need an association table between team and user (team and job)?

Add the team_id to these tables:

wolfboys commented 1 month ago

done