Font Size: a A A

The Design And Implementation Of Message System Of Open Platform Based On Microservice Architecture

Posted on:2019-10-10Degree:MasterType:Thesis
Country:ChinaCandidate:W XieFull Text:PDF
GTID:2428330590975659Subject:Engineering
Abstract/Summary:PDF Full Text Request
In recent years,with the rapid development of Internet companies,many companies have a large number of services and data resources.And they would open the company's API(Application Programming Interface)through the open platform to make these internal services and data into public resources,so that through their open API,they can attract the third-party developers to achieve the purpose of re-innovation by secondary development.At present,there are more and more scenarios where the systems of the third-party developers obtain enterprise data in real time or enterprise systems push data to the systems of the third-party developers.However,the common technology of polling calls of the API interfaces has a bad impact on both parts.In recent years,with the maturity of the publish/subscribe model,the model has been applied to the open platform for real-time data transmission,which results in a message system of the open platform.In addition,in order to solve the difficulty of scalability in traditional architectures,this system uses a new type of micro service architecture to build the system.Therefore,a message system of open platform based on microservice architecture has been designed and implemented in this thesis,aiming at the reliable and real-time problems in the data transfer between the existing open platform internal systems and the systems of the third-party developers.The main tasks are as follows:1)In order to break through the defects in deployment and scalability of the traditional single-cell architectures,the microservice architecture is used as the basic development framework of the message system for design and implementation.The architecture of the whole system is divided into three independent microservices: topic microservice,Web Socket long-connection microservice,message microservice.And a system-integrated distributed microservice framework is used to register and invoke services.This improves the modularity of the system.2)In order to achieve decoupling between internal systems and the systems of the third-party developers,the publish/subscribe model is used to achieve scalability and a more dynamic network topology in the topic microservice,the internal systems of open platform as producers,applies for topics to message system,encapsulates data into messages and publishes messages to the corresponding topics of the message system.A third-party developer,as a consumer,is only necessary to subscribe to the topics of interest through simple operations.3)In order to let developers do not need to care about the underlying data transmission,long-connection microservice is used to manage long-term connection.Two major problems in long-connection microservice have been solved: keep-alive of long connections and sharing of long connection sessions.This improves the reliability and service capabilities of the system.4)In order to better track and process the message in a holistic way,ensure that the message data can be transferred to the correct systems of the third-party developers in real time and reliably.The message microservice is used to perform the entire life cycle of each message in the system.In message microservice,optimization and innovation are mainly conducted in three aspects: algorithm optimization of global unique ID identification,message dual routing mechanism and delayed retransmission of messages,finally enabling efficient message transmission and full link tracking of messages.Based on the above work,a message system of open platform based on the microservice architecture was finally accomplished.The results of system testing show that the message system in this thesis can achieve transferring data reliably,efficiently and in real time between the open platform internal systems and the systems of the third-party developers.In addition,data consistency can be guaranteed in the case of concurrency.
Keywords/Search Tags:Micro Service Architecture, Open Platform, Publish and Subscribe, Message System
PDF Full Text Request
Related items