asp.net - What should be the number of generic handler for an application -
i have web application running on asp.net 4.0
, oracle 11g
. using ado.net
connect database server. application using ready around 15-20 generic-http-handlers
. calling generic-http-handler
jquery. want utilize more of these not sure effect of on appliation.
kindly suggest thought go more generic-http-handers
?
i going through web find out how many concurrent http request
can have in same tab of browser
form same domain. came across niche question on topic how many concurrent ajax (xmlhttprequest) requests allowed in popular browsers? suggest though ave async=true
in ajax phone call jquery have wait till other http request
has finished. has suggested can create sub-domain overcome issue. can 1 can suggest me weather should go more or not?
i'm not sure if asking whether many have 20 handlers defined, or have 20 handlers invoked jquery, address both.
in terms of defining many handlers, generic http handler (ashx) similar asp.net page handler (aspx), more lightweight in not have total lifecycle of page, , not intended returning ui. many large-scale applications have hundreds of aspx pages defined, consistent design intention of asp.net web forms, every ui page distinct aspx. so, have hundreds of ashx, less heavy hundreds of aspx, , no problem @ all.
in terms of invoking 20 handlers, here conversation "chunky" versus "chatty" interfaces. when interfacing on wan (i.e., between browser , server), "chunky" interface (one makes smaller number of heavier calls) better: when seek scale application, "chatty" interface (one makes higher number of lighter calls) hold open many more connections on server, cause more load on database in terms of higher number of transactions , higher number of open simultaneous connections, , hence not scale on server side.
on browser side, news worse. per http specification, browsers limit 2 simultaneous requests, if mean fire off 20 requests @ once, not happen, means may performance problem having many jquery get/post calls queueing @ 1 time.
the tradeoff, of course, programming cleaner "chatty" interface. here must create judgement future scaling needs, versus importance of cleaner code.
i if you're building application that, expected life , evolution, can comfortably run of traffic on single web , single database server; and, browser code set in such way 2 simultaneous requests not cause performance issue, reasonable go "chatty" interface if gives much cleaner code.
but if expect there need scaling beyond single server; or, there mutual utilize cases many of these jquery get/posts invoked simultaneously , hamper performance, means refactor more "chunky" interface, mean not calling more 20 handlers single page via jquery.
if you've read , still can't decide right, recommend refactoring interface create more "chunky".
hope helps, , best of luck you!
asp.net jquery ado.net httphandler
No comments:
Post a Comment