| With the continuous development of cloud computing technology,enterprise development gradually changes from the previous single architecture to the micro service architecture.As the development progresses,the complexity increases gradually,the deployment speed slows down,and the scalability is poor.Microservice architecture has become the mainstream architecture style for developing enterprise application systems.Microservice architecture is a development approach that develops an independent application system in the form of a set of small services.Each of these small services runs in its own process and often uses a lightweight mechanism such as RPC invocation service interfaces to communicate with each other to achieve full system functionality.However,because existing microservice architectures are designed on the basis of traditional api,traditional api have the problem of interdependence between data flow and control flow.When the business logic of a service changes,the invocation interfaces,parameter types,or service business logic of other services that are associated with it also need to be recoded in response to the change.This greatly reduces the flexibility of the microservices architecture and increases the workload of developers.Aiming at the shortcomings of traditional microservices that the data flow and control flow depend on each other,which leads to reduced flexibility,a new standardized control data separation API mechanism named SCONDAS API was proposed.Based on SCONDAS API,a microcomponent framework with low coupling,service orchestration and rule engine characteristics was designed.It can free enterprises from complicated business changes,build their own applications efficiently and quickly,avoid a lot of repeated development work,and improve efficiency and quality.Since the microcomponent framework has the characteristics of data flow and control flow separation,a controller is needed in the framework to arrange and compose scattered services to realize system functions to meet business requirements.This paper will introduce the research and implementation of the service controller of the microcomponent architecture in detail,and the research content is as follows:(1)Research on the overall design and implementation of SCONDAS API controller.Since the traditional microservice architecture cannot meet the requirements that the data flow and control flow of the SCONDAS API microcomponent are separated from each other,this paper redesigns a controller,which can realize the orchestration of services and the execution and invocation of business workflows under the characteristics of SCONDAS API compatibility.At the same time,the configuration syntax of service orchestration is designed,which can realize the configuration of workflow.Compared with the traditional workflow orchestration language,it has the characteristics of concise syntax and less code,which greatly improves the development efficiency of developers.(2)Research on the design and implementation of the flow actuator in the controller.As the core component of the controller,the executor is responsible for executing the business workflow in the configuration information,and the underlying services are executed in sequence.Executor supports serial,parallel and conditional jump execution of processes.(3)Research on fault tolerance mechanism of controller based on SCONDAS API.Aiming at the problem of service avalanche caused by service itself exception or network exception during the execution of service process in micro-component framework.The micro-component framework incorporates a service fault tolerance mechanism,which can be a rollback invocation of the implemented service.At the same time,under the service fault tolerance mechanism,in order to prevent the service cache invalalization problem when the service is rolled back,the micro-component framework realizes the dynamic setting of service data cache time,which can not only effectively solve the problem of cache invalalization,but also reduce the storage pressure of the service. |