CSE134A LECTURE NOTES

May 14, 2001
 
 

ANNOUNCEMENTS

The midterm is Wednesday this week.  There will be questions about all or most of these topics:

WEB SITE CONFIGURATION

A chain is only as strong as its weakest link.

Each server in a web site must be configured appropriately.  For example, consider the MySQL problem you've been facing.

A MySQL server spawns a thread for each incoming connection to the database.  Out of the box, 100 connections are allowed, with a timeout of 8 hours each.

One persistent connection is established for each Apache child process the first time that the database connect is called in the lifetime of
that process.  When the process is killed, the persistent connection should be ended.  However this may not happen.

MySQL solution: Reduce the timeout period at the server so that disconnects are automatic for clients that are idle from the MySQL server point of view.

Reference: http://www.faqts.com/knowledge_base/view.phtml/aid/230/fid/12
http://www.php.net/manual/en/function.mysql-pconnect.php

Incidentally, the second reference indicate that MySQL can scale up to at least 600 queries per second.

Specifically, for the second project:

That's all!
 

APPLICATION SERVERS

Two types: page-based versus component-based.  PHP is page-based.  Enterprise Java Beans is most common for component-based.  For an overview see http://www.zdnet.com/filters/printerfriendly/0,6061,2713465-50,00.html
 

PAGE-BASED

The main types are Microsoft ASP, ColdFusion, and Java server pages (JSP).

Code for generating displays is mixed with HTML output code.  This reduces modularity and makes developing multiple alternative interfaces difficult.  On the other hand prototyping is easy.

ColdFusion has fail-over and load-balancing.  PHP has compilation to byte-code.  Other performance features include caching.  Scalability tends to be under-estimated.

Typically do not have multithreading, Java support.  Typically do have ability to invoke other servers, e.g. via CORBA (common object request broker architecture), SOAP (simple object access protocol), and HTTP.
 

COMPONENT-BASED

These typically use Java as their programming language, and a distributed object standard called Enterprise Java Beans (EJB), which is part of the general Java 2 Enterprise Edition (J2EE) standard along with a database API known as JDBC (supposedly not an acronym for Java Data Base Connectivity).  Pricing is $795 to $35000 per CPU for IBM WebSphere.  Microsoft products, while not cheap and not quite as high-end, are much cheaper.  Despite using Java and the EJB so-called standard, you are typically locked in to one platform vendor due to incompatibilities.

The platforms provide

These last three features have historically been provided by so-called transaction monitors.

New modules of code can encapsulate existing databases and other servers.  Different modules can provide different displays.  EJBs have three main types: session beans, entity beans, and message-driven beans.

The importance of Java may decline because Sun and Microsoft both support SOAP and XML.

Peak performance: 4000 users at 177 pages per second on six servers: two web, three appl;ication, one Oracle.
 
 



Copyright (c) by Charles Elkan, 2001.