云原生CAx软件:远程调用技术汇总

计算云存储容器等新型技术的成熟,CAx(CAD/CAE/CAM)软件研发之初就要考虑如何充分利用云的弹性伸缩高可用性等技术优势。同时,伴随着WEB移动互联网等技术的普及,CAx软件也需要考虑多种客户端问题。这些无疑会对CAx软件架构设计、技术栈等诸方面提出新的要求与挑战。

Microservice Architecture for CAx

Ref. from Joseph Ingeno. Handbook of Software Architecture.

云原生计算基金会(Cloud Native Computing Foundation, CNCF)将云原生定义为使用开源软件堆栈来创建容器化动态编排面向微服务的应用程序。 云原生应用程序将云作为目标平台,是专门为云模型设计的应用程序。

以上种种,归结起来,就是要考虑设计与实现原生为云的CAx软件云原生CAx软件(Cloud Native CAx System)。

CAx Deployment Architecture on K8s

 分层架构(Layer/Tier Architecture)通过将功能组件进行逻辑上/物理上的分离来降低系统开发的复杂性,无疑有助于云原生CAx软件的设计与开发。

在分层架构中设计与实现层间的调用则是一个关键性的问题(另一个关键是系统层次划分)

因此,本文结合技术调研与工作实践,拟对此问题做初步的技术梳理与研究。希望对从事国产CAx软件研发的同行们在系统设计、技术选型等方面有所帮助,也非常欢迎大家予以批评指正。

注1:限于研究水平,分析难免不当,欢迎批评指正。

注2:文章内容会不定期更新。

零、基础预修

(Cloud)利用虚拟化等技术为用户提供计算、存储、网络等服务。因此,云本质上就是一种服务模式。按照承租方的数量,可分为公有云(Public Cloud)、私有云(Private Cloud)、混合云(Hybrid Cloud);按照服务类型,可分为基础设施即服务(Infrastructure as a Service, IaaS)、平台即服务(Platform as a Service, PaaS)、软件即服务(Software as a Service, SaaS)等。

一、RPC

gRPC是由 Google基于 HTTP/2协议开发的一个高性能、通用的开源RPC框架。

二、Web Services

服务(Service)是执行特定任务的一组功能单元。面向服务(Service-Oriented)是继面向过程面向对象之后的一种新的软件开发范式,其核心就是以松耦合粗粒度的服务来构建软件。

美国著名IT咨询公司Gartner Group于1996年进一步提出了面向服务架构(Service-Oriented Architecture, SOA)的软件架构模式,而Web Services则是SOA的一种具体技术实现。

Web services use SOAP over HTTP protocol to expose the existing function on the network.

 三、RESTful API

Roy Thomas Fielding在2000年发表的博士论文中,结合网络应用软件的特点,分析常见架构模式的属性,得到了设计与开发这类软件应当遵循的技术约束,并将其称作REST架构。

Ref. from Architectural Styles and the Design of Network-based Software Architectures

Starting with the Null Style

Client-Server

Stateless

Cache

Uniform Interface

Layered System

Code-On-Demand

Style Derivation

虽然Fielding的论文主要针对网络应用程序,但对CAx软件设计与开发也具有一定指导意义,

  • 大型软件系统通常比较复杂,须倚重组件化开发思想。
  • 软件架构描述了系统的元素组成、元素的外观属性、元素间关系等一系列基本问题。
  • 软件系统在不同层面、不同阶段可以有不同的架构。
  • 软件架构设计本质上是依据业务领域、用户需求、技术现状等因素而实施决策折中的过程。
  • 软件架构风格是针对特定场景(领域、需求、技术等)的架构级解决方案。

Ref. from OpenAPI

The OpenAPI Specification (OAS) provides a consistent means to carry information through each stage of the API lifecycle. It is a specification language for HTTP APIs that defines structure and syntax in a way that is not wedded to the programming language the API is created in. API specifications are typically written in YAML or JSON, allowing for easy sharing and consumption of the specification.

Ref. from GitHub OpenAPI Generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

参考文献

Erich Gamma. Design Patterns:elements of reusable object-oriented software. Addison Wesley, 1994.

Joseph Ingeno. Handbook of Software Architecture.

罗利民. 从Docker到Kubernetes入门与实战.  清华大学出版社, 2019.

顾宁. Web Services原理与研发实践. 机械工业出版社, 2006.

Fielding, Roy Thomas. Architectural Styles and the Design of Network-based Software Architectures. Doctoral dissertation, University of California, Irvine, 2000.

William Cheng. A Beginner's Guide to Code Generation for REST APIs.

网络资料

大型CAx(CAD/CAE/CAM)工业软件开发中的关键组件 https://blog.csdn.net/qq_26221775/article/details/123193318?spm=1001.2014.3001.5501

 云原生CAx软件:gRPChttps://blog.csdn.net/qq_26221775/article/details/130773008?spm=1001.2014.3001.5501Dockerhttps://www.docker.com/

Kuberneteshttps://kubernetes.io/

Kubernetes: Ingresshttps://kubernetes.io/docs/concepts/services-networking/ingress/

 Netflix Zuulhttps://github.com/Netflix/zuul

阿里云: API网关为K8s容器应用集群提供强大的接入能力 https://www.alibabacloud.com/help/zh/api-gateway/latest/api-gateway-provides-powerful-access-capabilities-for-k8s-container-application-clusters

HTTP 1.1https://datatracker.ietf.org/doc/html/rfc2616

Onshapehttps://www.onshape.com/en/

W3C: Web Services Glossaryhttps://www.w3.org/TR/2004/NOTE-ws-gloss-20040211/#webservice

What are Web Services?http://www.tutorialspoint.com/webservices/web_services_quick_guide.htm

XML Web Services Infrastructurehttps://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/sd5s0c6d(v=vs.100)

DIME: Sending Binary Data with Your SOAP Messageshttps://learn.microsoft.com/en-us/previous-versions/dotnet/articles/aa480488(v=msdn.10)

gSOAPhttps://www.genivia.com

gRPChttps://grpc.io/

Architectural Styles and the Design of Network-based Software Architectureshttps://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

RESTful APIhttps://restfulapi.net/

RESTful APIhttp://www.restfulapi.nl/

REST API Tutorialhttps://www.restapitutorial.com/

OpenAPIhttps://www.openapis.org/

OpenAPI Generatorhttps://openapi-generator.tech/

GitHub: OpenAPI Generatorhttps://github.com/OpenAPITools/openapi-generator

Apifoxhttps://apifox.com/

猜你喜欢

转载自blog.csdn.net/qq_26221775/article/details/129767474
今日推荐