deerc-dev / openedx-admin

Open edX Admin is a web app for an online course platform management
0 stars 2 forks source link

Engineering #1

Open veotani opened 4 years ago

veotani commented 4 years ago

It will be useful so have architecture scheme of the project. There are several types of them, few of them may be made:

  1. Data flow scheme
  2. Components and relations scheme (services, workers, databases, etc)
  3. Database scheme
  4. Business Processes (e. g. BPMN)

These are only my suggestions, you can pick anything you like (or pick none, if you are sure about it).

Can recommend this service: draw.io

dikuchan commented 4 years ago

Hi!

I implemented the data-flow diagram based on the avaliable issues. It may contiain architectural flaws, thus I'm glad to receive suggestions. Diagram is avaliable here.

Database in the diagram mentioned above is described via ERD. As before, corrections are applicable. It is avaliable here.

veotani commented 4 years ago

@dikuchan Thanks for awesome work! They look nice, but I'm have noticed a few things to be improved and here are my thoughts.

Data-flow diagram

It was hard for me to understand the diagram.

  1. Objects notation. I doubt Admin and Database are the same. Who is the Admin? As I understand, it is the person, the role of our system's user. Database is the component of our system. IMO objects and user roles must differ on the scheme. The same goes for Users and User. As I understand, User is a definition of a role - unprivileged user. Please make sure that the same notations means the same things. For example, when I try to analyse the diagram, I see that Admin (a filled in rectangle - must be a role of user of our system) sends Credentials (an arrow - the data that is being transferred) to an Register (rectangle with rounded corners, half filled in - must be an action). Register action turns Credentials into Encrypted credentials and on this point it all looks nice and simple, but then something happens and I'm lost: the receiver of the Encrypted credentials is Users (a filled in rectangle which I consider as a role). As far as I know, these credentials had to be sent to a database, so that they can be used for authorization. Probably the scheme itself was a bit overengineered. Probably I need a sip of coffee. You decide!
  2. Details. IMO it's better to omit details on how the app works. If you mention JWT in data flow scheme, then you have to mention other HTTP headers. I'd not bother myself including them in such scheme.

It could be a little bit more straightforward:

Entity-relationship

  1. Hashing. I came to realisation that hashing would cause problems when the system will be integrated with open edX. Please make sure you do not touch the password and keep it as it was sent. Don't worry! We will use this method to send into edX platform to hash it for us. But if we will double-hash the password, then user will not be able to log in.
  2. ProctoringLink is not a test field. Proctoring link is a link for an exam attempt of a single user on a specific test. It is my fault that #14 doesn't explain it well. Please move it somewhere else when you know it.
  3. Should Tests be included into Course object?

I surely may be wrong.

dikuchan commented 4 years ago

@veotani Thank you for the detailed review!

Data-flow diagram

  1. First of all, I forgot to mention that for clarity I named edX users as Students and users of our platform as Users. And by Admin I assumed an administrator of our platform mentioned in #10, a man who registers our Users. In addition, I totally forgot to use any of conventional notations in the diagram. In our case, Users is a database and User is an external source. Plus, renamed them for the sake of simplicity. Fixed now.
  2. I agree that JWT flow looks annoying and we could shrink it on the scheme.

Revised DFD.

Entity-relationship diagram

  1. Okay, I see it. Edited.
  2. I ended up merging proctoring link and test's grade into the single entity Attempt. As far as I understand, each user have a grade on an Attempt and each Attempt has a link. Was that the correct decision?
  3. Right. I forgot to remove the Tests field.

Revised ERD.

By the way, looking at the diagrams, can you tell if my understanding of the system is correct? Or did I miss something? Should we create more architecture schemes of the project?

veotani commented 4 years ago

@dikuchan LGTM!