The invention discloses a method of splitting the large application service as a micro service. The method includes the following steps: receiving the request instruction of extracting the target micro service; separating the corresponding target code from the code set through the method tracking technique; classifying the target code and generating the module corresponding to the class; sealing the module to the module. Mirror image file; extract target micro service from mirror file. The technical scheme provided by the embodiment of the invention is to separate the corresponding target code according to the request instruction of the received target micro service, classify the target code, generate the module of the corresponding category, encapsulate the module into the mirror file, and extract the target micro service from the mirror file. Automatically dividing large application services into micro services greatly reduces workload, reduces work cost and improves resolution efficiency. The invention also discloses a device, a device and a storage medium for splitting the large-scale application service into micro service, and has the corresponding technical effect.
【技术实现步骤摘要】
一种拆分大型应用服务为微服务的方法、装置及设备
本专利技术涉及计算机应用
,特别是涉及一种拆分大型应用服务为微服务的方法、装置、设备及可读存储介质。
技术介绍
随着计算机应用技术的发展,为了更好的发挥资源的利用率以及实现快速部署应用的目的,进行了应用容器化管理,把大型应用拆分成小的微服务。利用拆分成的微服务提供对外的服务,各个微服务互相关联、互相访问,最终形成一个统一的整体应用服务的功能。在这种情况下,既可以减轻单一服务的压力,还可以解决服务的高可用,因此利用微服务对外提供服务的技术得到了很多公司主流业务的使用,且该技术可以大力推广。现有技术中拆分大型应用服务为微服务是通过手动拆分完成的,手动拆分的过程大致包括:对应用划分功能模块,对各模块关键函数方法形成统一的标准调用接口和应用程序编程接口api,把每个模块做成容器镜像,配置自启动服务。但是,手动拆分的方式工作量很大,工作成本高,拆分效率低。
技术实现思路
为解决上述技术问题,本专利技术提供如下技术方案:一种拆分大型应用服务为微服务的方法,包括:接收提取目标微服务的请求指令;通过方法跟踪技术从预设的代码集合中拆分出所述请求指令对应的目标代码;根据所述目标代码的特征信息,对所述目标代码进行分类,并生成对应类别的模块;将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件;通过所述主函数从所述镜像文件中提取所述目标微服务。在本专利技术的一种具体实施方式中,所述将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件,包括:当调用测试脚本测试到所述模块的入口可用时 ...
【技术保护点】
1.一种拆分大型应用服务为微服务的方法,其特征在于,包括:接收提取目标微服务的请求指令;通过方法跟踪技术从预设的代码集合中拆分出所述请求指令对应的目标代码;根据所述目标代码的特征信息,对所述目标代码进行分类,并生成对应类别的模块;将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件;通过所述主函数从所述镜像文件中提取所述目标微服务。
【技术特征摘要】
1.一种拆分大型应用服务为微服务的方法,其特征在于,包括:接收提取目标微服务的请求指令;通过方法跟踪技术从预设的代码集合中拆分出所述请求指令对应的目标代码;根据所述目标代码的特征信息,对所述目标代码进行分类,并生成对应类别的模块;将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件;通过所述主函数从所述镜像文件中提取所述目标微服务。2.根据权利要求1所述的方法,其特征在于,所述将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件,包括:当调用测试脚本测试到所述模块的入口可用时,将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件。3.根据权利要求1所述的方法,其特征在于,在所述将所述模块的入口封装到主函数中,并将所述模块封装成提供所述目标微服务的镜像文件之后,还包括:对所述镜像文件进行高可用部署和负载均衡部署。4.根据权利要求1至3任一项所述的方法,其特征在于,在所述通过所述主函数从所述镜像文件中提取所述目标微服务之后,还包括:为所述目标微服务部署服务功能。5.根据权利要求1所述的方法,其特征在于,所述根据所述目标代码的特征信息,对所述目标代码进行分类,包括:根据所述目标代码的请求路径,对所述目标代码进行分类。6...
【专利技术属性】
技术研发人员:段国栋,
申请(专利权)人:郑州云海信息技术有限公司,
类型:发明
国别省市:河南,41
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。