APP下载

基于微服务架构在跨境电商企业公共服务系统中的设计和实现

2021-02-28边涛吕哲楠张成喆赵锟张程张弛王玉楠

电脑知识与技术 2021年35期

边涛 吕哲楠 张成喆 赵锟 张程 张弛 王玉楠

摘要:随着信息化时代的发展,业务系统越发庞大复杂,系统开发及维护面临着巨大的挑战。针对这一问题,基于微服务架构的统一应用应运而生。微服务架构有很多优点,但是也会带来很多复杂性问题,需要额外的代价来解决。从应用架构、支撑框架方面总结了一套关于微服务的具体实现,并对如何通过架构分解实现新型架构进行了说明,最后通过对跨境电商的企业服务平台的微服务架构进行实现,达到了预期效果。

关键词:微应用;微服务;跨境电商

中图分类号:TP311      文献标识码:A

文章编号:1009-3044(2021)35-0142-03

Design and Implementation of Cross-border E-commerce Enterprise Public Service System Based on Micro-service Architecture

BIAN Tao1, LV Zhe-nan1, ZHANG Cheng-zhe1, ZHAO Kun1, ZHANG Cheng1, ZHANG Chi1, WANG Yu-nan2

(1.China electronic port data center Tianjin Branch, Tianjin 300012, China; 2. Tianjin Electronic Time Tech Center, Tianjin 300012, China)

Abstract: With the development of information age, business systems are becoming more and more complex, and the development and maintenance of the systems are facing great challenges. In order to solve this problem, the application based on micro-service architecture has emerged. Microservice architecture has many advantages, but it also brings many complexity problems, which need to be solved at extra cost. This paper summarizes a specific implementation of micro-service from the aspects of application architecture and supporting framework, and explains how to realize the new architecture through architecture decomposition. Finally, it achieves the expected effect by implementing the micro-service architecture of the enterprise service platform of cross-border e-commerce.

Key words: micro-application; micro-service; cross-border e-commerce platform

微服務这一概念是由美国作者Martin Fowler于2014年最早提出,微服务架构(Micro Service Architecture)是指一种由多服务协同组成的应用模式,所有服务都独立部署在不同进程内,各个服务都有自己清晰的界限,服务之间通过如HTTP、REST协议进行通信[1],可以灵活使用多种不同编程技术和数据存储技术构建多项服务。

微服务架构具有健壮、容错性好、耦合度低、独立部署与灵活扩展等优点,但是微服务架构也会带来诸多复杂性问题。首先就是微服务架构的设计,按照具体的业务逻辑和应用场景来组建微服务架构的应用组成部分,以及各组成部分之间要建立相互通信机制。其次就是要考虑采用新的技术和框架来支撑和保障新的服务架构,实施灵活的部署方式和自动路由规划。最后业务应用被拆分为若干个服务后,也需要一个对业务和服务进行整体性能监控的工具,保障架构的稳定性和高可用性。……

登录APP查看全文