To build the Internet medical platform architecture platform, we tried DevOps, which is directly related to the actual situation. We had a lot of technical scenarios and a very complex business scenario.

The back-end

It is a microservice formed by Spring Cloud. Postgresql is used as the master data set library to support the service data of the two platforms of Internet hospital and Internet medical service, Redis is stored as user session, RabbitMQ is used as service reservation queue, and NetTY is used as instant messaging. Openresty’s API gateway is used to interact with the client.

The back-end architecture diagram is quite large, so take time to draw it.

The front end

In the early stage, app development was divided into two parts: patients and doctors. The unified use of FLUTTER reduced the workload of business development (but also brought the workload of in-depth adaptation and debugging of FLUTTER technology). In the later stage, wechat official account of H5 and small programs were added.

Integrated environment

It is necessary to form three-terminal interface integration and data collaboration of Internet hospital -> Medical center -> hospital HIS to realize Internet prescription and payment, which can be directly synchronized to hospital HIS.

Product scenario

The product is oriented to the architecture without limiting the number of hospitals, that is, more hospitals can be continuously connected to the Internet medical platform through configuration, and the docking of medical HIS system and payment coordination can be realized.

The CLOUD uses THE N O. 1 cloud, which is later incorporated into other clouds based on business requirements (due to the independent operation requirements of regional medical services), so the complexity of cloud deployment is very high!

Micro service

We are in the process of the architectural design must first solve the problem of is released, the use of micro service is necessary, because the business scenario is too complex, geared to the needs of customers much more special, monomer unified release is a kind of disaster, but the advantage is that medical business application architecture form is clear, easy to micro service modular division, This results in multiple microservices of moderate granularity.

* * * * deployment

The process microservice and API Gateway are divided into two versions running in the cloud simultaneously, one is Test and the other is Prod. Why use this form? Because in the complex business and computing environment, our test environment as far as possible close to the actual production environment is one of the best, otherwise, the test if the system online, will appear because of the production of various special cases severe bugs, so the process of regression test repeatedly, will lead to waste a lot of time, affect the online.

In addition, an environment with a large difference between test and production will lead to more communication between engineers involved in the process of release engineering, resulting in greater actual variables and higher coordination costs, and even lead to a cycle of repeated reconfiguration and retesting.

Our goal is that after strict testing of the microservices in the Test environment, after meeting the requirements and quality of the production level, we only need to push the microservices to the upgraded version of the production environment. After testing and confirming the upgraded version again, the API gateway will update the direction of the production environment to the latest version.

gallery

In addition, THE API gateway also has the next level of Nginx, which mainly provides the release service and image download service for the front-end H5. On the one hand, the patient graph of Internet medical treatment belongs to the privacy level, so it must form the ACL access table through the fine-grained user/graph correspondence for the access control of the health graph. On the other hand, to improve the concurrent performance of graph access, API gateway loads two graph proxy services. The proxy service accesses the database through LUA script and authenticates the ACL for the current callback user before connecting to OSS to access the health file map.

The most troubling or is the application of app store post questions, on the one hand, apple’s audit, some contents about the second audit process must be blocked, otherwise it is difficult to through, so this is also the production environment must use many versions, especially increased the review version, and the final upgrade version is different, so even android version released a success, Do not directly provide the latest functions. Otherwise, ios users are affected. You must wait until the ios audit is complete.

Gateway difficult to actually independent unification version adjustment on this issue, so need to rely on the app and backend version management coordination adaptation of certain audit process, audit unfinished still want to keep the old version of the micro service, when after the success of the audit, the app version again with the back-end to maintain consistent dynamic upgrade, gateway, H5 also need to cooperate to upgrade. This process often occurs when major features are upgraded. In order to prevent severe jitter in customer usage, it is hard to imagine a situation without the front and back end development, testing, QA, and operations engineers working together.

Therefore, the back-end of the whole system is deployed using Docker uniformly from basic software and microservices. The release management of Docker by back-end engineers and operation and maintenance engineers is basically completed directly in docker management tool. Devops: Dev push -> Test push -> Prod Version +1 -> API Gateway Redirect devOPS: Dev Push -> Test push -> Prod Version +1 -> API Gateway Redirect devOPS: Dev Push -> Test push -> Prod Version +1 -> API Gateway Redirect devOPS: Dev Push -> Test push -> Prod Version +1 -> API Gateway Redirect

Head over to Byte Read Zhihu — learn more about big data

Public id Read-byte “Read bytes” Distributed, big data, depth of software architecture, professional interpretation