如何模块化 B2B Web 服务转换应用程序
您如何模块化一个大型应用程序,该应用程序具有一些传入 (SOAP) Web 服务、一些传出 Web 服务、它们与内部格式之间的转换、内部日志记录服务、访问外部存档 Web 服务、延迟内容以及异步处理等等?
一种方法是将功能拆分为 WAR 集合,将它们全部部署在一台应用程序服务器上,并让它们与内部 Web 服务进行通信。这会产生一些开销,特别是当消息很大时,并且您可能会由于线程计数限制等而遇到性能问题。
另一种方法是将所有内容放入一个巨大的 WAR 中,以便您可以直接进行通信。不完全是模块化。你会怎么办?
How would you modularize a large application that has some incoming (SOAP) webservices, some outgoing webservices, transformations between them and internal formats, internal logging services, accesses external archiving webservices, delays stuff and works on this asynchronously and so forth?
One way is to split the functionality into a collection of WAR, deploy all of them on one application server and have them communicate with internal webservices. This has some overhead, especially if the messages are large, and you might run into performance problems due to thread count restrictions and so forth.
Another way would be to put everything into a giant WAR, such that you can communicate directly. Not exactly modularization. What would you do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,这很大程度上取决于模块之间的依赖关系。他们能独立生活,在独自奔跑时完成一些有用的事情吗?如果是这样,单独部署它们可能是有意义的,这样您就可以在其他部分保持运行的同时升级系统。如果它们只能组合起来做一些有用的事情,那么将它们部署在不同机器上的唯一原因可能是硬件的限制。
In my opinion, depends strongly on the dependencies between the modules. Can they live on their own, fullfilling something usefull when running alone? If so, it might make sense to deploy them seperately, so you can upgrade your system while other parts keep running. If they can only do something usefull in combination, the only reason to deploy them on different machines could be limitations of hardware.