Groups | Blog | Home
all groups > dotnet performance > august 2005 >

dotnet performance : Performance Issue with Singleton Object


binodp NO[at]SPAM gmail.com
8/10/2005 12:47:58 AM
I need to understand that would it be a problem if?
Situation : I have a Bussiness FrontController which would take all the

call from Presentation Tier. Presentation tier passes a "Request
Object" to the Frontcontroller which in turn passes to the Factory
Object which decides which manager is apt to work on this Request
Object. Then this Manager is returned back to the Frontcontroller which

wud run excute method of Manager. Now manager may have to run "Business

rule engine" over this object, or/and may have to persist this data.
once that is over it wud return a response object which front
controller wud return back to the presentation tier.


Problem: Since this is a web based application, what would be the
implication to have this front controller as Singleton. If there is
multiple hits on the website and since there is only one entry point to

the business layer i.e Business Frontcontroller, would it hamper the
performance. If yes can anyone suggest a better design consideration.


Best Regards,
Binod.
David Browne
8/11/2005 12:17:03 PM

[quoted text, click to view]

A singleton can be accessed from multiple threads at the same time. So it's
concurrent by default. The only sertialization is what you introduce to
protect shared resources.

David

AddThis Social Bookmark Button