13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LogoAd Bannerthe presentation layer with the HTTP service layer and spreading theload among multiple CPUs <strong>for</strong> one layer will automatically spread it<strong>for</strong> the other.Navigation/Context BarThe multi-CPU box versus multiple-separate-box decision here isagain based on whether or not the presentation layer holds state. Ifno session state is held by the running presentation scripts, it is moreeconomical to add CPUs inside separate physical computers.SectionLinksFooterCONTENTAREAContent in gray is derived from the master template. Note thatdoesn't mean that it is static or not page-specific. If a template is anASP or JSP fragment it can execute arbitrarily complex computerprograms to generate what appears within its portion of the page.Content in aqua comes from the per-page template.This sounds inefficient due to the large number of file system probes.However, once a system is in production it is easy <strong>for</strong> the Web serverto cache, per-URL, the results of the file system investigation. In fact,the Web server could cache all of the templates in its virtual memory<strong>for</strong> maximum speed. The reason that one wouldn't do this duringdevelopment is that it would make debugging difficult. Every time youchanged a template you'd have to restart the Web server or clear thecache in order to view the results of the change.7.5 Intermodule APIsRecall from the User Registration and Management chapter that wewant people to be accountable <strong>for</strong> their actions within an onlinecommunity. One way to enhance accountability is by offering a "user11.1.4 HTTP ServiceHTTP service per se is so simple that it hardly warrants itsown layer. A high per<strong>for</strong>mance pure HTTP server programsuch as Zeus (see www.zeus.com) can handle more than6000 requests per second and saturate a 100Mbps networklink on a single 500MHz Celeron processor. As of January2002 it would cost roughly $25,000 per month to pay <strong>for</strong> all thebandwidth that a single-CPU HTTP server could consume.Why then would anyone ever need to deploy multiple CPUs tosupport HTTP service? The reason is that HTTP servers areusually packaged with software to support computationallymore expensive layers. For example the Oracle RDBMSserver, capable of supporting the persistence layer and theabstraction layer, also includes the necessary software <strong>for</strong>interpreting Java Server Pages and per<strong>for</strong>ming HTTP service.If you were running a popular service directly from Oracleyou'd probably need more than one CPU. More commonexamples are Web servers such as IIS and AOLserver thatare capable of handling the presentation and HTTP servicelayers from the same operating system process. If your scriptsinvolve a lot of template parsing it is easy to overload a singleCPU with the demands of the Web server/script interpreter.If no state is being stored in the HTTP Service layer it ischeapest to add CPUs in separate physical boxes. HTTP isstateless and user interaction is entirely mediated by theRDBMS. There<strong>for</strong>e there is no reason <strong>for</strong> a CPU serving apage to User A to want to communicate with a CPU serving apage to User B.142207

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!