Professional Documents
Culture Documents
Web Galaxy
Abstract
Web Technology has been popular since 1992. Numerous systems have been
developed to meet the increasing demands of websites. The CGI technology originally
used is still being used today and new ones keep emerging. It is still not easy for
developers and private companies to know which technology is the best fit. There is no
definite answer. In this project, three different web setups are built and a simple test of
web request response time will be recorded. The test results will provide some useful
information for developers and companies to choose the right configuration.
1. Introduction
There are several reasons I chose this project. I have done web
programming for more than five years, including two years for eBay and one and
half years for IdeaLab. The class requires us to build a project using a language
we are most familiar with. After experiencing so many real life web site projects,
building another one for this class is not a challenge. For class 437 software
engineering, I have already done a similar project. On the other hand, there are
other web programming technologies I have heard of or picked up pieces from
time to time but I have not had any chance to work on it seriously. I’d like to take
this chance to explore them.
The application will be run on a laptop with a Pentium III 700MHz and
128MB RAM. The first application will run on a Linux operating system and the
other two will be developed under a Windows system. After the first one is
completed, it will be erased to make room for application two and application
three. So at the end I will have two applications in one computer. After the above
development, I will do some comparison among them and do a simple
performance test. A rough idea of what technologies to use for building an e-
commerce site will be generated.
2. Technological Background
This project involves quite a lot of technologies, including operating systems, web
servers, databases and server-side languages. Each application has its unique
combinations. Some components have platform dependency. Some components have less
dependency and can be developed under different platforms. I have chosen three popular
configurations for this project. There is no doubt that there are many other ways to
combine it. It is beyond the scope of this project.
Red Hat: Red Hat Linux is a platform for open source computing. It is
certified by top enterprise hardware and software vendors. From the
desktop to the data center, Red Hat couples the innovation of open source
technology and the stability of a true enterprise-class platform.
IIS 5.0: IIS is an enterprise-level Web server that is included with several
versions of Windows. According to Netcraft Web Server Survey, as of April
2005, around 21% of the web sites on the Internet are using IIS. It can only be run
under a windows-based operating system.
Apache 1.3: Apache Web server has been the most popular Web server since
April 1996 because of its stability, efficiency, portability, security and small size.
It can run on Unix, Linux, Mac OS, Windows and numerous other platforms.
According to Netcraft Web Server Survey, as of April 20005, more than 68% of
web sites on the Internet are using Apache, thus making it more widely used
than all other web servers. Apache is commonly run under an UNIX like system
but it also supports windows-based systems.
2.4 Database
MySQL: The most popular open source SQL database, is developed and
provided by MySQL AB. The MySQL software delivers a very fast,
multi-threaded, multi-user, and robust SQL database server. It is intended
for mission-critical, heavy-load production systems as well as for
embedding into mass-deployed software. It supports numerous platforms
and it’s very easy to install and upgrade.
SQL 2000: SQL Server 2000 offers a complete database and analysis
solution for rapidly delivering the next generation of scalable Web
applications. As a core component of Microsoft Windows Server System,
it dramatically reduces the time required to bring e-commerce and data
warehousing applications to market. SQL Server 2000 includes support for
XML and HTTP and also takes full advantage of Microsoft Windows
2000, including support for Microsoft Active Directory.
3. System Architecture
Application 1:
Application 2:
All packages from this application are made by one vendor, Microsoft. The
functionalities are streamlined, especially between Visual Studio .NET 2003 and SQL
2000. From .NET, database connection can be created and database information is
available by clicking the Tool menu. The installations are not difficult and most of the
time the default settings are enough. The instructions for using them are clear. This
application also supports page inheritance and code reuse. It has its unique <asp> tag and
it can reduce the amount of code to achieve field validation. Visual Studio .NET has a
very nice project editor as long as the computer is fast. The database procedure can be
called by C# providing parameters and reduce the amount of code in C# programming.
Application 2 runs slower than application 1 with the same hardware. It is slow to
open the project from Visual Studio .NET 2003 and it is slow when I try to see the result
from the browser. It would be much better used on a faster computer. From VB script
ASP to ASP.NET, Microsoft has dramatically changed its way to create web pages. Web
sites that used VB script ASP have to be totally rewritten to upgrade to ASP.NET.
Programmers who are good at VB script ASP have to learn one of the new languages,
such as VB.NET, C#.NET or J#.NET etc. The odd thing I found is that each page can
only have one web form. To perform a different function is through writing
“ImageClicked” event function in the same script. Traditionally, the web developers use
more than one form in one page to perform different actions. Also the user control label
can not be registered by the web project if it’s created dynamically, so all user control
labels have to be created in advance.
Since .NET was introduced in 2002, it has not been widely used but it is getting
more popular. C# has very similar syntax as JAVA. Microsoft promoted that it does not
hurt performance which language to use as long as it runs under .NET framework.
Apparently, C# was created to attract JAVA programmer to switch to C# programming.
PERL can be run under the .NET framework also.
Application 3
GUI design is not a concern for this project. The three applications will
use the same design. No image will be used for the web site. Most of the
pages are database driven. Each page maintains a similar look. It has a top
menu, left menu and bottom menu. The left menu has search function,
product display page and the link to advanced search. The top menu has a
link to the shopping car and the bottom menu provides the links to static
information pages which won’t be created for this project. The snapshots
of the pages for application one are in appendix D and application two and
three are part of my demo.
The first step of building the web application is to install all necessary
software and tools including operating system, web sever, database and
language, compatible editors and third party modules.
The second step is to do configuration and set up and get ready for
development.
The third step is to design the web pages.
The fifth step is to implement database drive web pages with server side
languages.
Two databases will be used. They are MySQL and SQL 2000.
5. Performance Evaluation
The detailed results are shown in the charts in the appendix. Ten attempts
were run for each language for each situation. The average results from
the charts are shown in the chart below.
Averages of All Charts
2.500
2.000
1.500
Time (sec)
C#
JSP/Servlet
1.000
0.500
0.000
Empty Cart Add to Cart Profile Search Category
Page
5.3 Analysis
0.030
0.025
Time (sec)
0.020
SQL2000
0.010
0.005
0.000
1 2 3 4 5
Attempt
The limitation of this performance is that we have to make sure both setup
should have optimized coding. The performances of different versions of
operating system, web server and database may vary. It is not clear
whether more powerful hardware would make a big difference in
performance. A typical E-commerce site has concurrent multi-users. How
many users the site can support at the same time is very important also. It
requires complex testing environment and it’s beyond a 20-week project.
6. Conclusion
The first application was built with a Linux operating system written in
PERL and served by Apache server. The other two were developed under a
Windows system. Application 2 is written in C# and runs under Window IIS and
Application 3 is written in JSP/servlets and served by Tomcat.
Two databases have been used for this application. I would definitely
choose SQL 2000 over MySQL. SQL 2000 has better performance than MySQL
and it has more features. The features comparison has been presented at my
presentation slides.
7. References
Whitehead, Paul. Active Server Pages 3.0. IDG Books Worldwide, 2000.
Rolsky, Dave and Williams, Ken. Embedding Perl in HTML with Mason. O’Reilly,
2003.
Deitel, H.M., Deitel, P.J., and Goldberg, A.B. Internet & World Wide Web: How to
Program. Pearson Education, 2004.
Steelman, Andrea and Murach, Joel. Murach’s Java Servlets and JSP. Murach, 2003.
Hunter, Jason and Crawford, William. Java Servlet Programming. O’Reilly, 1998.
Nielsen, Paul. Microsoft SQL Server 2000 Bible. Wiley, 2003.
Wainwright, Peter. Professional Apache. Wrox, 1999.
Goodwill, James. Developing Java Servlets. Sams, 1999.
Dubois, Paul. MySQL. Sams, 2003.
Bekman, Stas; Cholet, Eric. Practical mod_perl. O’Reilly 2003
Meyne, Hank and Davis, Scott. Developing Web Applications with ASP.NET and C#.
Wiley, 2002.
Ruvalcaba, Zak. ASP.NET Website Using C# & VB.NET. Sitepoint, 2004.
www.perl.org
www.apache.org
www.oracle.com
www.microsoft.com
www.mysql.com
Language Comparison:
http://www.epinions.com/inet-review-540-141E6FD0-3A0CAA3F-prod2
Java vs. PERL
http://kreiger.linuxgods.com/kiki/?java+vs+perl+examples
http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=25866
Java, c++, PERL
http://www.flat222.org/mac/bench/
.NET vs. J2EE
http://java.oreilly.com/news/farley_0800.html
http://www.theserverside.net/news/thread.tss?thread_id=29747
http://www.theserverside.com/articles/article.tss?l=J2EE-vs-DOTNET
Apache vs. IIS
http://searchwin2000.techtarget.com/originalContent/0,289142,sid1_gci833798,00.html
http://www.serverwatch.com/tutorials/article.php/3074841
Database Comparison
http://dev.mysql.com/tech-resources/crash-me.php
http://www.tpc.org/tpcc/results/tpcc_perf_results.asp
http://www.tpc.org/tpcc/results/tpcc_price_perf_results.asp
http://www.mssqlcity.com/Articles/Compare/sql_server_vs_mysql.htm
http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm
Window vs. Linux
http://www.michaelhorowitz.com/Linux.vs.Windows.html
http://www.devx.com/opensource/Article/16969
Appendix A. Functions
Each application has its own codes for each functionality.
product display
product quick search
product advanced search
shopping cart
Application 2:
CREATE TABLE [dbo].[Order_Items] (
[Order_Item_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Order_ID] [int] NOT NULL ,
[Item_ID] [int] NOT NULL ,
[Category_ID] [int] NOT NULL ,
[Description] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[PricePerUnit] [money] NOT NULL ,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
Application 3:
No user manual needed for web site. The web site is designed for easy use by clicking
through the links on the page, top, left and bottom menus.
Appendix D GUI
Appendix E Test Results
0.120
0.100
Time (sec)
0.080
0.060
0.040
0.020
0.000
1&2 3&4 5&6 7&8 9 & 10
Attem pt
C#: 0.177 sec Average Add to Cart Page
JAVA: 0.151 sec Average
0.200
0.180
0.160
0.140
0.120
Time (sec)
C#
0.100
JAVA
0.080
0.060
0.040
0.020
0.000
1&2 3&4 5&6 7&8 9 & 10
Attem pt
0.120
0.100
Time (sec)
0.080
C#
0.060 JAVA
0.040
0.020
C#: 0.163 sec Average
0.000 Se arch Page
JAVA: 2.189
1 & sec
2 Average
3&4 5&6 7&8 9 & 10
2.500 Attempt
2.000
C#
1.500
Time (sec)
JAVA
1.000
0.500
0.000
1&2 3&4 5&6 7&8 9 & 10
Attempt
C#: 0.154 sec Average Category Page
JAVA: 2.179 sec Average
2.500
2.000
Time (sec)
1.500
C#
JAVA
1.000
0.500
0.000
1&2 3&4 5&6 7&8 9 & 10
Attempt
2.500
2.000
1.500
Time (sec)
C#
JSP/Servlet
1.000
0.500
0.000
Empty Cart Add to Cart Profile Search Category
Page
SQL2000: 0.006 sec Average SQL Database
MySQL: 0.024 sec Average
0.035
0.030
0.025
Time (sec)
0.020 SQL2000
0.010
0.005
0.000
1 2 3 4 5
Attempt
Appendix F
Presentation Slides