简体   繁体   English

这种“中介”模式的名称是什么?

[英]What is the name of this 'intermediary' pattern?

I've got an intermediary java web service application application (built using Spark Java - but that is incidental) that takes an http parameter - from it generates a URL - calls the URL and then returns the result to the original caller. 我有一个中间的Java Web服务应用程序应用程序(使用Spark Java构建-但这是偶然的),该应用程序带有一个http参数-从中生成一个URL-调用该URL,然后将结果返回给原始调用者。

Original Client -> My Application -> Http Web Service Producer

This is kind of a MicroServices pattern - but I'm looking for a more specific term. 这是一种MicroServices模式-但我正在寻找一个更具体的术语。 I think it is a 'pipeline', 'solicitor' or a 'mediator'. 我认为这是“管道”,“律师”或“调解人”。

My question is: What is the name of this 'intermediary' pattern? 我的问题是: 这种“中介”模式的名称什么?

It is a API Gateway Pattern, which is commonly used when working with microservices architecture. 这是一个API网关模式,在使用微服务体系结构时通常使用。 This pattern hides all services from client allowing client to connect with a API Service. 此模式对客户端隐藏了所有服务,从而允许客户端与API服务连接。 This API Service handle all request while do another stuffs like organize all requisition, for example. 例如,此API服务处理所有请求,而同时进行诸如组织所有请购单之类的其他工作。

The way this pattern handle requests is a example of Facade Pattern. 该模式处理请求的方式就是外观模式的一个示例。

I recommend you to read links below to understand how this pattern works properly: http://microservices.io/patterns/apigateway.html 我建议您阅读下面的链接以了解此模式如何正常工作: http : //microservices.io/patterns/apigateway.html

https://www.nginx.com/blog/building-microservices-using-an-api-gateway/ https://www.nginx.com/blog/building-microservices-using-an-api-gateway/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM