Online system for selling cosmetics
to female customers

CS 514 Final Project
Kamen Yotov, kyotov@cs.cornell.edu

Resume.pdf
Poster.pdf
Project Requirements

Use BEA Weblogic to build an online system for selling cosmetics to female customers. The system should support a database of products and customer information and should be customized, so that a customer will be greeted in a personalized way when she returns next time. Consider the scalability, security and reliability issues raised by your architecture. How can they be addressed?

The intend of the project is to build a vendor-independent cross-browser web site (www.eScent.com), which can be used to buy cosmetics for all-purposes.

Architecture

The main idea is to have several Weblogic clusters, distributed geographically (by means of internet), one of which is denoted as the primary cluster, while the others are referred as secondary.
When a client requests a connection to www.eScent.com, it gets connected to the primary server (cluster) R. It then multicasts the request to the secondary servers (via UDP, TCP or even GMP), which on theirs turn ping the client and calculate virtual distance entities.
They send these latencies (using the same protocol) to R and it decides to which to connect the client (by returning a simple HTML frameset element, with an only frame, pointing to the appropriate secondary server). All user profile maintenance and shopping transactions are through R. Secondary clusters have (mostly) static.

Advantages:

  • The framesets provide ad-hoc availability, as if the secondary server to which the client is connected crashes, when the client gets HTTP 404 "Server not found" error, she will presumably press refresh and the browser will try to connect to www.eScent.com again (repeating the previous procedure). Only the shopping bag will be lost, but it is proven to be empty most of the time.
  • The use of simple protocol (like UDP) avoids much of the time overhear of more complex protocols and provides some hidden possibilities, like for example easy maintenance of the underlying database. Once we want to update the database of a secondary cluster (for example to add new products) we can just turn off its listening for UDP on the specified port. This way we guarantee no clients will be sent to it.
  • The primary server (cluster) is able to timestamp users and according to the version of the database in secondary sites, which they were referred to in the past. This way we ensure that no user ever sees an old copy of the database (provided that there are enough secondary servers).

These and several other (minor) design ideas were found to be very appropriate to the set of the problem. I was able to observe very graceful degradation of performance. The result is a highly scalable e-commerce platform (as we add more secondary servers (clusters) if we have heavy browsing traffic and more servers to the primary cluster if the current bottleneck is doing transactions to the database).

Communication

A typical sequence of events:

  1. The client requests a connection to www.eScent.com (which points to the primary cluster R)
  2. R notifies all secondary clusters about the request via UDP (also available by TPC, GMS, but not necessary).
  3. Secondary clusters ping the client and calculate round-trip latencies, sending them back to R.
  4. R chooses between the first several responses and directs the client to one of the secondary clusters.

Advantages:

  1. Multicasting client requests through UDP proves to be fast, efficient and with very small overhead (Reliability). Also helps for updating the distributed database (no need to close sites!).
  2. Framesets ensure that even in case of secondary cluster failure, the client will be connected to another one with minimum losses, like shopping bag information (Availability).
Implementation

The entire project was developed and deployed on the newest versions of BEA Weblogic (6.0 beta) and Microsoft SQL Server (8.0, 2000).

State-of-the-art Technologies:

  • Weblogic 6.0 JSP 1.1 server-side scripting
  • W3C DOM 2 Web standard
  • Motion-enabled starting page
  • DHTML exploited to full extend

Cutting-edge Tools:

  • BEA Weblogic 6.0 Beta
  • Microsoft SQL Server
  • Borland JBuilder 4.0
  • Allaire Homesite 4.51
  • Macromedia Ultradev 1.0
  • Macromedia Flash 5.0
  • Adobe Photoshop 5.5
  • Xara Webstyle 1.2