简体   繁体   English

如何在SOA堆栈中部署独立服务? 基于Java EE

[英]How could I deploy independent services in a SOA stack? Java EE based

I have a Web-Service stack in Java EE, and I have a problem: everytime I need change a specific service, deploy and restart the application, the others one need to be restarted too. 我在Java EE中有一个Web服务堆栈,但有一个问题:每次我需要更改特定服务,部署并重新启动应用程序时,其他一个也需要重新启动。

I would like to know if there is some architecture (open-source) to deploy my services in separated contexts. 我想知道是否有某种体系结构(开源)在不同的上下文中部署我的服务。 I want to create a SOA structure. 我想创建一个SOA结构。

In a logical thinking: create an application for each webservice. 用逻辑思维:为每个Web服务创建一个应用程序。 But, I really believe that exists an easier alternative. 但是,我真的相信这是一个更简单的选择。

I need to audit each service (duration time, enter parameters, result, if it got error) 我需要审核每个服务(持续时间,输入参数,结果,如果发现错误)

What you suggest? 你有什么建议?

You didn't supply a lot of details but if you have real services (ie independent components that communicate via interfaces) there is no real reason to have them in the same application anyway. 您没有提供很多细节,但是如果您拥有真实的服务(即,通过接口进行通信的独立组件),则没有真正的理由将它们放在同一应用程序中。

More so, having each service in its own application allows you to change, scale etc. each one independently form the others and gives you added flexibility vs. having them in one app 更重要的是,将每个服务都放在自己的应用程序中可让您进行更改,扩展等。每个服务独立形成其他服务,与在一个应用程序中包含它们相比,您可以提高灵活性

Not sure what requirement you have on your runtime environment. 不确定您对运行时环境有什么要求。

Typically you group such services into applications, if there are too many to handle as separate applications. 如果有太多服务无法作为单独的应用程序处理,通常将这些服务分组到应用程序中。 If you have a set of services that are related, such as "Order services", "financial services", "logistics services" or what have you. 如果您有一组相关的服务,例如“订单服务”,“金融服务”,“物流服务”或您拥有的服务。

When you need to change one, there is a high possibility you also need to make changes in related services, such as updating schemas or what not. 当您需要更改一项时,您很有可能还需要在相关服务中进行更改,例如更新架构或不进行更改。 In this case all services won't need to be restarted, just a "group" (application). 在这种情况下,不需要重新启动所有服务,只需重新启动“组”(应用程序)即可。

There are also tailor made containers for those situations, specifically for services in the integration layer. 也有针对这些情况的量身定制的容器,特别是集成层中的服务。

I'm thinking of Apache Service Mix which deploys SOA services as OSGi bundles that are easy to handle, separate from each other. 我正在考虑使用Apache Service Mix将SOA服务部署为易于处理,彼此分离的OSGi捆绑软件。

It should be possible to deploy web applications if you alter the configuration and packaging a bit. 如果稍微更改配置和打包,则应该可以部署Web应用程序。

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

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