A) When A Person logins to Indian Railway
System , How many instance of LoginServlet
will be running on an instance of JVM
(which can handle 50 requests [threads] ) ?
Answer:- One
B) Imagine that the stuff is developed in
ASP.NET webforms , how many instance
of LoginPage.aspx will be running on an
instance of ASP.net application ?
(Which can handle 50 requests. I mean
active , not in the queue )
Answer:- Fifty
C) Imagine that the stuff is developed in
ASP.NET MVC , how many instance
of LoginController will be running on
an instance of ASP.net application ?
(Which can handle 50 requests. I mean
active , not in the queue )
Answer:- Fifty
The answer to the third question surprised me.
Yesterday,I had a epiphany that only one
instance of LoginController is essential. I
thought,MVC folks should have gone
for that.
If there are no class Level Variables in a
controller, we need to create only one instance
of a Controller to serve a particular request type.
Funny fact is ASP.net folks insist that
controller should have this behavior. If the
controller is stateless,why Fifty instance in the
above case ?
Can any one explain why ASP.net MVC folks
are creating multiple instance of a particular
controller (type) ?
No wonder,why Java wins on the internet. I think,
Java has got scalability because of their decision
to have only one instance of a servlet type inside
a JVM
System , How many instance of LoginServlet
will be running on an instance of JVM
(which can handle 50 requests [threads] ) ?
Answer:- One
B) Imagine that the stuff is developed in
ASP.NET webforms , how many instance
of LoginPage.aspx will be running on an
instance of ASP.net application ?
(Which can handle 50 requests. I mean
active , not in the queue )
Answer:- Fifty
C) Imagine that the stuff is developed in
ASP.NET MVC , how many instance
of LoginController will be running on
an instance of ASP.net application ?
(Which can handle 50 requests. I mean
active , not in the queue )
Answer:- Fifty
The answer to the third question surprised me.
Yesterday,I had a epiphany that only one
instance of LoginController is essential. I
thought,MVC folks should have gone
for that.
If there are no class Level Variables in a
controller, we need to create only one instance
of a Controller to serve a particular request type.
Funny fact is ASP.net folks insist that
controller should have this behavior. If the
controller is stateless,why Fifty instance in the
above case ?
Can any one explain why ASP.net MVC folks
are creating multiple instance of a particular
controller (type) ?
No wonder,why Java wins on the internet. I think,
Java has got scalability because of their decision
to have only one instance of a servlet type inside
a JVM
3 comments:
Are there any information available on arch of railway site and how they handle these many requests?
I loved the example of Indian Railways website. The worst performing website ever. LOL
And the statement that Java is winning over .NET in the internet is completely baseless.
Indian Railways were used as an example to say that Java Servlet technology has got an inherently stateless architecture ( One instance of Servlets for all requests of a given type ) . But, Indian Railway site is one of the biggest sites in the world
Post a Comment