当前位置:网站首页>[structure training camp - module 3]

[structure training camp - module 3]

2022-06-22 09:38:00 InfoQ

Outsourcing student management system architecture document

Preface

This document is mainly the detailed architecture document of the outsourced student management system , It is used to guide the development of outsourcing student management system 、 Testing and operation and maintenance .

glossary

  • Nginx
  • MySQL
  • Spring Boot

1. Business background

With the continuous expansion of the scale of the school , The increase in the number of students , The information that needs to be processed is also increasing . Not only spend a lot of teacher resources , Processing efficiency is also very low . This leads to the following problems :

  • Inefficient management
  • Lack of standardized student information management
  • Unable to scientifically analyze students' learning

Based on the above questions , We have developed and designed a student management system , It is applied to the management of all kinds of information of students , The overall task is to realize the systematization of students' information relationship 、 Normalization 、 automation , Its main task is to count all kinds of student information for daily management , Such as query 、 modify 、 increase 、 Delete 、 And students' course selection 、 Performance query and other functions of the design of the management system .
 Business background map

2. Constraints and restrictions

  • The investment fund of the project is 200 Ten thousand yuan
  • Project milestone (2022 year 01 month 01 Japan ~2022 year 05 month 31 Japan ):
  • First iteration (2022 year 01 month 01 Japan -2022 year 02 month 01 Japan ):
    Complete login registration 、 Authority management function
  • Second iteration (2022 year 02 month 01 Japan -2022 year 03 month 01 Japan ):
    Complete the student information management function
  • The third iteration (2022 year 03 month 01 Japan -2022 year 04 month 01 Japan ):
    Complete the function of uploading and arranging courses
  • Fourth iteration (2022 year 04 month 01 Japan -2022 year 05 month 01 Japan ):
    Complete the course selection 、 The test 、 Scoring function
  • The fifth iteration (2022 year 05 month 01 Japan -2022 year 05 month 31 Japan ):
    Complete the background operation and maintenance management function
  • The project adopts the mainstream technology in the industry
  • One for operation and one for standby MySQL database , Ensure that data is not lost
  • use Nginx Reverse proxy
  • use Spring Boot The frame acts as a scaffold , Provide development efficiency
  • This project has different actual effect requirements for data storage
  • Student status information should be kept permanently
  • Publish course information , At least keep 1 year
  • Student examination results and reward and punishment records , Keep it forever

3. Overall framework

3.1  Architecture analysis

  • High availability :
    For student management system , The loss of student status information will bring great trouble to students
  • High performance :
    For the lesson grabbing function module , Course information is undoubtedly hot data , It needs to be guaranteed in 50000TPS
  • Scalable :
    Because the project is in its infancy , At present, it only serves XX School , After communication with the business side , It is found that the course examination module should have certain expandable performance
  • cost 、 Security :
    Currently only serves one school , As long as the deployment 4 Servers ; Involving student status information , Encrypted storage is needed

3.2  System architecture

 System architecture diagram
The overall architecture is divided into three layers : The data layer 、 Service layer 、 Gateway layer

  • The data layer :
    One for operation and one for standby MySQL. Generally, data is read and written on the main database , And real-time binlog Log in MySQL Back up the database for playback ; When the primary database fails , Switch between active and standby , Ensure that the data service will not be interrupted .
  • Service layer :
    Improve project development efficiency based on business analysis , Split the service into : Student subsystem 、 Course subsystem 、 Permission subsystem ; Each development team is responsible for the development of a subsystem ;
  • Gateway layer :
    use Nginx As a traffic gateway and service gateway . On the one hand, the request circuit breaker mechanism is used , Carry the call pressure in case of high concurrency , Prevent the whole system from collapsing , Guarantee the core function ( Student management module ) The usability of ; Another aspect , Depending on the request , Route to different service subsystems .

4. Detailed design

4.1  Core functions

4.1.1  Account entry and activation
 Account entry and activation sequence diagram
4.1.2  Course input and course selection sequence diagram
 Course input and course selection sequence diagram

4.2  Key design

4.2.1  High availability of data
Because the data storage adopts MySQL The primary and secondary architecture of , Message replication is used for synchronization between active and standby systems . In the daily operation and maintenance process , You need to consider message replication latency , Ensure that the data delay does not exceed 30s, And do a good job in daily alarm monitoring . meanwhile , During daily operation , Practice active / standby switchover .
4.2.2  High performance of lesson grabbing function
In the course of class grabbing , forecast TPS Will reach 50000TPS, You need to consider high concurrency , The pressure on the database should not affect the normal use of other functions .

4.3  design code

  • use Spring Boot+MyBatis Framework for development
  • MySQL Database adoption Innodb engine
  • Error code specification : Subsystem code + Specific business error code ; Student subsystem :M01, Course subsystem :M02, Permission subsystem :M03
  • use Fegin As web Server client
  • Table development design and specific development specifications , May refer to 《 Alibaba Java Development Manual 》

5. Quality design

5.1  cost

  • Labor cost
    : front end (2 people )、 Back end (4 people ),UI(1 people ),BA(1 people ), Daily Operation (1 people )
  • Server cost :
    4 Servers (2 Servers +2 Station database )

5.2  ...Testability

  • The coverage rate of core business unit test reaches 85%
  • Full link voltage test of core services

5.3  Maintainability

  • MySQL When the host fails , The standby machine can be switched automatically
  • When a business function fails , Business fault isolation is available , Ensure that other businesses can be carried out normally

5.4  Observability

  • Provide log view interface
  • Provide jvm、CPU And other performance indicators monitoring interface

6. Evolution planning

Student management system project , Adopt agile development , It is divided into five iterations , Step by step , Promote the smooth implementation of the project .
原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202220522201013.html