On 29/05/2014 15:10, Alexander Lehmann wrote:
> Tomcat, at least with the 2.x servlet version is using a thread per
> request model of execution. Basically each request that is received from
> a client uses and blocks a thread in your tomcat jvm as long as the
> request is being processed (same with e.g. apache with worker mpm
> model), so that the number of client connections is directly related to
> the number of used threads. Depending on the memory consumption of the
> servlet threads, you will usually have a rather limited number of
> threads available (e.g. 100 or 250),
Only partially true, the Connector used is a choice and the NIO
connector is, well, non-blocking for IO.
Comparing threads is pointless when the number of threads in Tomcat is
end-user configurable and more importantly orientated towards an
entirely different application architecture.
By the above reasoning, one might infer that the rather limited number
of threads encouraged by vert.x is a less ideal solution, when in fact
it offers comparable (if not better) performance using an order of
magnitude less threads.
which limits the number of clients
> that can connect.
Using the NIO connector means being able to support 10000 connections
(configurable), (with the otherwise default settings) & just 200 threads
(configurable).
So most of the below is based on a false premise, unfortunately.
It's nothing to do with Tomcat's 'execution model'. The Servlet 3.x
specs offer more async features, but just throwing work over to another
thread pool doesn't guarantee better performance, unfortunately.
Tomcat is a Servlet Container with a long history and a bunch of spec
versions behind it and all of the compromises and iterations that
implies. Its design is based on a different way of thinking to vert.x's
design, which at /worst/ has the benefit of being able to start over
without all of that baggage.
s
> On Thursday, May 29, 2014 3:15:10 PM UTC+2, Ronald Randon wrote:
>
> For the past few days I have beed reading vert.x documents. I know
> that vert.x is polyglot, single threaded, non-blocking IO, modular
> architecture, high scalability.
>
> Is there any other major differences between tomcat and vert.x?
>
> Also when we should use tomcat and when to use vert.x?
>