写点什么

模块三作业

作者:HZ
  • 2022 年 4 月 14 日
  • 本文字数:1741 字

    阅读完需:约 6 分钟

前言

This document is intended to give a detailed high level system design of the Student Management System. It presents an overview of the system, its design consideration and the architecture itself. The intended audience for this document are software engineers, QAs and DevOps.


词汇表

MySQL: Open source relational database

Nginx: Open source web server usually serving as reverse proxy and load balancer

Replica: Database node that have exact same copy of data as primary database


1. 业务背景

In traditional university management, records like course arrangement, student grading information are maintained by lecturers manually. With the rapid growth of the university and raising number of students, it becomes challenging to invest more human resources in such work considering the high cost and low efficiency. Thus it is necessary to simplify the work by introducing an online student management system.


2. 约束和限制

  1. The system should be delivered within 6 months.

  2. Total investment amount should not exceed xxx Chinese Yuan.

  3. The system should be highly available, with an up time of at least 99.5%.

  4. All data should be stored locally in university, and cannot be accessed externally.


3. 总体架构



3.1 架构分析


3.2 总体架构

The overall system consists of various micro services, including student management sub-system, course sub-system and permission sub-system. Each service is deployed in separate nodes and thus high maintainability is guaranteed. Engineering team can decide to upgrade or patch any sub-system without affecting others. Less coupling among sub-systems also allows the developers to work on different sub-systems independently.


Each sub-system stores data in MySQL database. Since the overall traffic for the student management system is less than xxx (QPS), it is sufficient to use relational database not NoSQL. In the meanwhile, since MySQL is open-source, the cost is pretty manageable compared with commercial database like Oracle.


There are two MySQL instances in the system. The primary database is responsible for handling all write requests, while the replica database is majorly used for data backup and read-only operations. The two databases are synced and eventually consistency is guaranteed.


4. 详细设计


4.1 核心功能

Student Management Workflow:

Course management workflow is similar to above diagram.


4.2 关键设计

  1. Availability


The system is highly available because the service is split into multiple micro services, which can be run independently. Even one micro-service is down the rest can still operate normally.


Secondly, thanks to the introduction of Nginx, we can easily scale out different sub-systems when there is high traffic.


Thirdly, two copies of data are stored in different nodes. When primary node is not available, the backup node can be promoted to be the new primary node.


  1. Security


All data are stored in local database instead of cloud storage like DynamoDB. With proper firewall setting, data is owned by university only and can be accessed only within school network.


4.3 设计规范

1) Spring Boot as overall micro-service framework.

2) gRPC for remote procedure call.

3) MyISM as MySQL DB engine since it is faster when having multiple secondary indices.


5. 质量设计

  1. Testability

  2. Maintainability

  3. Cost

Note: Don't know what this section is about.


6. 演进规划

The project will be delivered in two phases:

Phase 1:

1) Implement student sub-system and course sub-system

2) Only primary DB is in use

Phase 2:

1) Introduce permission sub-system

2) Add backup database


用户头像

HZ

关注

还未添加个人签名 2022.03.06 加入

还未添加个人简介

评论

发布
暂无评论
模块三作业_架构实战营_HZ_InfoQ写作平台