Font Size: a A A

Design And Implementation Of High-performance Remote Procedure Call Framework Based On Response

Posted on:2022-07-02Degree:MasterType:Thesis
Country:ChinaCandidate:X M HuFull Text:PDF
GTID:2518306341957979Subject:Electronics and Communications Engineering
Abstract/Summary:PDF Full Text Request
With the development of the Internet industry,the lifestyle of human has stepped over from the paper era to the information era.In the early stages,traditional Internet projects adopted single framework,with the advantages of relatively easy to develop and simple to deploy and operation and maintain.However,with the increase of traffic and the expansion of business scale,the performance of single framework has gradually met bottleneck,unnecessary delays and unresponsiveness occur during peak periods.Therefore,the Internet framework evolves from single to distributing.In distributed project,the concept of service oriented split is adopted,and different service modules are developed and deployed separately,Remote Procedure Call(RPC)framework is used to implement service publishing and service calling between services.At the same time,the framework can also deal with the network request security,load balancing and other distributed issues,to achieve high availability of the system.However,current mainstream RPC frameworks do not support responsive method calls,so access to responsive items is difficult.To solve this problem,a responsive and high-performance distributed RPC framework is designed and implemented in this paper,which integrates the current mainstream distributed technology,realizes annotation-based configuration management,and simplifies the access process of the framework.The framework is divided into network communication function,service routing function,service calling function and extension function.Meanwhile,the framework also optimizes the implementation and performance of distributed functions.For data transmission,it encapsulates the privatization protocol stack,which is compatible with most usage scenarios and guarantees the universality of the protocol.For communication framework,secondary development is carried out based on Netty framework,and perfect code encapsulation is made for connection management and heartbeat management to ensure the high availability of services.The project also incorporates reactor-Netty communication framework based on Reactive Programming to meet the problem that Reactive Stream cannot be supported in the current RPC framework.In terms of serialization transmission,in addition to docking with Kryo,JDK,Protubuf,and Hession,the project also implements a serialization framework Fast Str.After comparison,the framework has good serialization capability.In terms of service governance,the project connects the current mainstream distributed consistency framework Zookeeper as a registry,and designs and implements a lightweight registry based on REST style.For service calling,a variety of load balancing modes are studied and integrated to realize automatic weight management within the service,and dynamic bytecode calling based on Javassist is designed and implemented.In the service monitoring,the distributed link tracking function is designed and implemented to assist developers in fault diagnosis and performance evaluation through log printing of call chain.In the overall framework design,based on the thought of Serial Peripheral Interface(SPI),the SPI technology of Java is optimized,and the configuration extensibility mechanism is realized in six aspects,including communication protocol,serialization method,compression method,registry,service agent,and filter.Besides,the project realizes the integration of the Distributed transaction framework Seata and the Sentinel distributed high availability traffic management framework based on filter pattern.Finally,by comparing the performance with the Dubbo framework,it can be seen that the framework has good distributed processing capability.
Keywords/Search Tags:Distributed, Remote Procedure Call, Serial Peripheral Interface, Serialization, Distributed Link Tracking, Reactive Programming
PDF Full Text Request
Related items