简体   繁体   English

在服务器端和客户端具有不同的WAR并将它们部署在不同的应用程序服务器中的利弊

[英]Pros and Cons of having different WARs for server and client side and deploying them in different application servers

We have a product in which the UI is packaged as a separate WAR and server is packaged as a separate WAR file. 我们有一个产品,其中UI被打包为单独的WAR,服务器被打包为单独的WAR文件。 Right now both these WARs are deployed in the same app container. 现在,这两个WAR都部署在同一个应用容器中。 Below are the pros and cons of this approach that i have found: 以下是我发现的这种方法的优缺点:

Pros of having different wars: 1. I feel having two different WARs allows me the flexibility of refactoring either UI or server side code without affecting the other. 进行不同战争的优点:1.我感到有两种不同的WAR使我可以灵活地重构UI或服务器端代码,而不影响其他代码。 2. To maximize memory usage, i can deploy it in two different containers. 2.为了最大程度地利用内存,我可以将其部署在两个不同的容器中。 so if earlier i was using 2 GB for the entire jboss (say i am using jboss), now i can potentially use 4 gb if deployed in two different jboss app servers (ofcourse different port no.) 3. I can scale my application. 因此,如果以前我为整个jboss使用2 GB(例如我在使用jboss),现在如果部署在两个不同的jboss应用服务器(当然端口号不同)中,则可以潜在地使用4 GB。3.我可以扩展应用程序。 If tomorrow, i see that server is my bottleneck, then i could create a server farm,(for my server module only), since the server itself is a different WAR, without bothering about UI WAR. 如果明天看到服务器是我的瓶颈,那么我可以创建一个服务器场(仅适用于我的服务器模块),因为服务器本身是一个不同的WAR,而无需担心UI WAR。 4. Loosely coupled and gives me various integrations points 4.松散耦合,为我提供各种集成点

Cons: 1. For UI, i use primefaces. 缺点:1.对于UI,我使用素数。 i do not see a use case where i could see an integration framework like seam adding value. 我看不到用例,在这种情况下我可以看到诸如缝线增值之类的集成框架。 Can someone tell me if having an integration framework would make sense for my UI war? 有人可以告诉我拥有集成框架是否对我的UI战争有意义吗? Basically, the whole fun of seam, is the wonderful integration that its provides with UI, EJB among other stuff. 基本上,缝的全部乐趣是它与UI,EJB等提供的出色集成。 Therefore, i do not see too much value here because my form would ask the rest API to do all the processing. 因此,我在这里看不到太多的价值,因为我的表单会要求其余的API进行所有处理。

Can someone tell me if having multiple wars actually help in scalability and maintenance. 有人可以告诉我,多次战争是否真的有助于扩展性和维护性。 eg,one benefit that i see is that if i have two wars and i need to upgrade server platform, i do not need to bring down my UI. 例如,我看到的一个好处是,如果我有两次战争,并且需要升级服务器平台,则不需要降低UI。 Any other benefit apart from what i have listed above? 除了我上面列出的以外,还有其他好处吗?

Also, i want to understand if everything is packaged as an EAR, how would you scale specific layers of our architecture. 另外,我想了解如果所有内容都打包为EAR,那么您将如何扩展我们架构的特定层。 As mentioned above, if i feel server layer is the bottleneck, in case of one WAR/EAR, how would i scale my application? 如上所述,如果我觉得服务器层是瓶颈,那么在一个WAR / EAR的情况下,我将如何扩展我的应用程序?

I am still not sure if i need to carry on with my model of different WARs in different application servers, or should i have just one WAR for my entire application? 我仍然不确定是否需要在不同的应用程序服务器中继续使用不同WAR的模型,还是整个应用程序仅拥有一个WAR? Please guide... 请指导...

If you backend if independent and you comunicate with client using some REST or SOAP web service - this is good. 如果您的后端是独立的,并且使用某些REST或SOAP Web服务与客户端进行通信-这很好。 Try to imagine that tommorow you drop your client with java and create other one with .NET. 尝试想象一下,明天您将使用Java删除客户端,并使用.NET创建其他客户端。 Does backend need some changes? 后端是否需要一些更改? If not - this is good. 如果不是,那很好。 If yes - I think it does not coast to have 2 wars. 如果是的话-我认为进行2场战争不会滑行。

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

相关问题 Maven是否应为不同的应用程序服务器打包不同的WAR? - Should Maven package different WARs for different application servers? GWT:将客户端和服务器端分为不同的WAR - GWT: Separate client- and server-sides into different WARs 如何在不同战争中将Web应用程序拆分为模块? - how to split a web application in different wars as modules? 在部署在不同服务器上的两次战争之间共享pojo对象 - Sharing a pojo objrct between two wars deployed in different servers 使用枚举设计卡片类-两种不同设计的优点/缺点 - Designing a Card class using Enums - Pros/Cons of 2 different designs s ParseUser.CurrentUser()在客户端的解析服务器上有所不同 - s ParseUser.CurrentUser() different on Parses servers from Client Side 在具有不同弹簧的单个tomcat服务器上进行多次战争 - multiple wars on a single tomcat server with different spring 在两台不同的计算机上创建RMI应用程序时,客户端和服务器应在哪里定义接口客户端或服务器端? - When creating an RMI application on two different machines Client and Server Where should we Define our Interface Client side or Server side? 使用一个控制器处理多种资源的利弊 - Pros and cons of having one controller for multiple resources Clojure http客户端库的优缺点 - Pros and Cons of Clojure http client libraries
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM