SOA:为什么不使用 Erlang/OTP Web 服务器作为服务? [英] SOA: Why do not use Erlang/OTP web servers as services?

查看:31
本文介绍了SOA:为什么不使用 Erlang/OTP Web 服务器作为服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读面向服务的架构原则网站和相应的维基百科文章 我有一个想法:Erlang/OTP 平台可以被认为是一个 SOA 平台,SOA 应用程序可以在它上面构建.

After reading the Service Oriented Architecture Principles site and the respective Wikipedia article I had a thought: the Erlang/OTP platform can be considered as an SOA platform and SOA applications can be built on it.

唯一的是服务合同在这样一个系统非常具体:为了在 Erlang/OTP 中调用服务,编排层必须通过 Erlang 消息或调用 gen_server(取决于实现)进行调用.

The only thing is that the Service Contract for each service in such a system is very specific: in order to call a service in Erlang/OTP the Orchestrating layer would have to make calls via Erlang messages or calls to gen_server (depends on the implementation).

这将不允许对 Erlang/OTP 平台范围之外的服务进行任何调用.

This would not let making any calls to the services outside of Erlang/OTP platform scope.

但是,如果我们尝试通过将所有相应的服务功能移动到基于 Erlang 的网络服务器(如 Mochiweb)并从本质上将每个服务的接口从 gen_server:call 更改为 XML 来构建每个服务呢?

But what if we try to build each Service by moving all the respective Service functionality into an Erlang-based webserver, like Mochiweb and essentially changing the interface of each Service from gen_server:call to XML?

这将允许使用基于 WSDL.

此外,这种方法将让我们继续使用 OTP 监控程序和其他 OTP 功能,因为此类服务仍将是 OTP 应用程序.

Moreover, this approach will let us continue using OTP supervisors and other OTP features, because such a Service will still be an OTP application.

所以,问题是:您认为通过使用 OTP 网络服务器 (Mochiweb) 作为服务来构建具有面向服务架构方法的软件应用程序是一个好主意吗?额外的 XML 处理层会破坏这种方法的所有优点吗?

So, the question is: Do you think that building a software application with the Service Oriented Architecture approach by using OTP webservers (Mochiweb) as Services is a good idea? Can the additional XML processing layer destroy all the advantages of such approach?

推荐答案

不这样做的主要原因是因为您将自己限制在 SOA 协议中.Erlang 通过一些附加点(监视器)实现了 IP 协议.虽然你可以做到,但我想知道它是否值得.

The primary reason this is not done is because you would limit yourself to the protocol of SOA. Erlang implements the protocol of IP with some added points (monitors). While you can do it, I wonder if it would be worth it.

原则上,Erlang 已经拥有 SOA idea 的所有工具,但没有 SOAPWSDL 的所有膨胀:)

In principle, Erlang already has all the tooling for the idea of SOA but without all the bloat of SOAP and WSDL :)

这篇关于SOA:为什么不使用 Erlang/OTP Web 服务器作为服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆