Interest Ask. This is just my view on this topic, so take everything with salt. I sometimes used and managed applications using both servlet containers and embedded servers. I am sure that there are still many good reasons for using servlet containers, but I will try to just focus on why they are less popular today.
Short version: Servlet containers are great for managing multiple applications on the same host, but they don't seem very useful for managing just one application. In cloud environments, one application per virtual machine seems preferable and more common. Modern frameworks want to be compatible, so switch to embedded servers.
Therefore, I believe that cloud services are the main reason for rejecting servlet containers. Just as servlet containers let you manage applications, cloud services let you manage virtual machines, instances, data storage, and more. It sounds more complicated, but with cloud environments, there has been a shift to separate machines for applications. This means that you can often process the entire machine as an application. Each application runs on a machine with an appropriate size. Cloud instances can pop up and disappear at any time, which is great for scaling. If the application requires more resources, you create more instances.
Dedicated servers, on the other hand, are usually powerful, but with a fixed size, so you run several applications on the same machine to maximize the use of resources. Manage dozens of applications - each with its own configurations, web servers, routes and connections, etc. - not funny, so using a servlet container helps keep everything manageable by itself. However, it is more complicated. Servlet containers in the cloud do not seem very useful. They need to be customized for each small instance, without bringing much importance, since they run only one application.
In addition, the clouds are cool and the cloudy things are boring (if we still believe in the hype). Many frameworks try to scale by default so that they can be easily deployed to the clouds. Embedded servers are quick to deploy and start, so they seem like a smart solution. Servlet containers are typically supported, but require more complex configuration.
Some other points:
- The embedded server can be optimized for the framework or better integrated with the framework tools (for example, the playback console).
- Not all cloud environments come with customizable native images. Instead of writing initialization scripts to download and configure servlet containers, using dedicated software to deploy cloud applications is much simpler.
- I have yet to find a Tomcat installation that does not welcome you with perm space error every few repeated deployments of your application. Taking a bit longer (restarting) the built-in servers is not a problem when you can almost instantly switch between the stages of creation and production without any downtime.
- As already mentioned in this question, it is very convenient for the end user to simply launch the application.
- Embedded servers are portable and easy to develop. Today everything is fast, prototypes and MVPs must be created and delivered as quickly as possible. Nobody wants to spend too much time creating an environment for each developer.
Kapep May 6 '14 at 2:32 a.m. 2014-05-06 02:32
source share