DOC PREVIEW
SJSU CMPE 226 - Implementing Web Applications in MLPQ System

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Implementing Web Applications in MLPQ System Shasha Wu ([email protected]) I. Designing web applications in MLPQ System 1. Designing Infrastructure. Browser Constraint DBWeb ServiceH TM LTCP/IP SocketSpecific ApplicationTCP/IPTCP/IPSocketSocket    2. Responsibilities for three tiers: Browser Web Service CDB • User interfaces. • Send user’s requests to Web Server. • Accept results from Web Service. • Display the results. • Accept requests from the browser. • Parse the request to CDB acceptable command and arguments. • Send commands to CDB. • Accept result from CDB. • Explain the result (Optional) • Return result to Browser. • Accept commands and arguments from Web Server. • Activate related operations according to the command and arguments. • Return the results to Web Service. 3. Commands and arguments for CDB: Command Arguments Actions on CDB ResultOpen <user> <filename>$ Create a view for the user and open a CDB data file. 0 (success) 1 (fail) Close <user> <filename>$ Close the view of the user. 0 (success) 1 (fail) SQLBasic <user> <filename> <relation name> #<select>#<from>#<where>$ Execute a SQL query on the user’s view. File.txt# 1 (fail) SQLAggregate <user> <filename> <relation name> #<select>#<from>#<where> #<group>#<having>$ Execute a SQL query on the user’s view. File.txt# 1 (fail) SQLSet <user> <filename> < relation name> #<select1>#<from1>#<where1> #<set_op> #<select2>#<from2>#<where2>$ Execute a SQL query on the user’s view. File.txt# 1 (fail) SQLNested <user> <filename> <relation name> #<select1>#<from1>#<where1> #<nest_op> #<select2>#<from2>#<where2>$ Execute a SQL query on the user’s view. File.txt# 1 (fail) Datalog <user> <filename> <datalog string>$ Execute a Datalog query on the user’s view. file.txt# 1 (fail) Include <user> <filename> <relation name> <color>$ Highlight the relation by its name and assign a color for it in the view. 0 (success) 1 (fail) Clear <user> <filename>$ Deselect all relations 0 (success) 1 (fail) GetImage <user> <filename>$ Copy the image of the view in screen and save to disk. File.bmp# 1: failColorRelation <user> <filename> <relation_name>$ Do color relation on given relation. Zoom <user> <filename> <x> <y> <w> <h>$ Zoom the image. GetAnimation <user> <filename> <Start> <End> <Step>$ Generate serious animation images *color: 0=black; 1=red; 2=green; 3=blue. The default environment settings are saved in mlpq_nt.cfg file and the values of the settings are displayed in following table. The system administrator can modify these settings in the file to configure the server. Name and Value Description WorkDir = “c:\inetpub\wwwroot\dbs\”, Define the directory to load constraint database files by the server. OutPut = “c:\inetpub\wwwroot\dbs\”, Define the directory for the server to output its result file. Port = “2222”. Define the value of socket port 4. Sample codes in middle tier: Open Sam Police.txt$ SQLBasic Sam Police.txt view1#Contains.Street, Contains.x, Contains.y# Contains# Contains.Street= “Vine”$ Datalog Sam Police.txt view2(id, x, y):- Contains(id, x, y), id=“Oak”$ Include Sam Police.txt Contains 0$ Include Sam Police.txt view1 2$ Include Sam Police.txt view2 1$ GetImage Sam Police.txt$ ColorRelation Sam test6.txt test6$ Zoom Sam test6.txt 300 20 100 60$ GetAnimation Sam torpedo.txt 0 25 1$II. Implementing the Web Application 1. Server Installation and Implementation 1) Get the MLPQ Web Access package and extract mlpq_nt.exe to any local directory. 2) Extract w3Socket.zip and install it to any local directory. 3) Install IIS (Internet Information Server) and PWS (Personal Web Server) if they are not available in your machine. IIS 5.0 is not a default installation in Windows 2000 Professional. But they are all included in your Windows Install CD (Same situation in Windows XP Professional). You can install them from “Start”  “Settings”  “Control Panel”  “Add/Remove Programs”  “Add/Remove Windows Components”. You can find the IIS option from the component list box. Selecting IIS from the box and click “Details”, you can find “Personal Web Manager” item in the component list. Make sure you already checked it and click “OK” to continue the installation. When installing PWS, please use the default settings and set the root directory to “c:\inetpub\wwwroot”. (Notice: Windows XP Home version does not support IIS and PWS, so you can not run your web server in a machine that only has Windows XP Home operating system.) 4) If you already installed IIS and PWS but the root directory is not the same as we asked. You can change the root setting through the PWS manager, which can be loaded from “Start”  “Settings”  “Control Panel”  “Administrative Tools”  “Personal Web Server”. There are three choices on the left side of the PWS window. Please select “Advanced” from them. Or you can also select it from the “View” menu. In the advanced view, you cansee a “Virtual Directory” box on the top and three buttons on the right of the box. Select “<Home>” item in the box and click button “Edit” to change the root directory. 5) Extract wwwroot.zip to “c:\inetpub\wwwroot”. 6) Create a sub-directory “\dbs” under “c:\inetpub\wwwroot” and copy police.txt to the directory. 7) Run mlpq_nt.exe and select “listen” item from its “help” menu. 8) Make sure the PWS service already started up in your server. To check the status of PWS, you can open the PWS manager from “Start”  “Settings”  “Control Panel”  “Management Tools”  “Personal Web Server”. 2. Client Execution 1) Open IE in client machine. 2) Input the Server's IP address followed with “login.html”. For example: "http://139.1.2.3/Login.html" or "http://localhost/Login.html". 3) Input a user name to login. 4) Do what you want by the function buttons in the bottom. 5) If you run the mlpq_nt.exe and the browser at the same machine, please make sure the MLPQ window are not covered by any other windows when you are querying. Otherwise, it may return blank graph. You can minimize the MLPQ


View Full Document

SJSU CMPE 226 - Implementing Web Applications in MLPQ System

Documents in this Course
SQL-99

SQL-99

71 pages

XML

XML

52 pages

XML

XML

14 pages

Chapter 9

Chapter 9

45 pages

Load more
Download Implementing Web Applications in MLPQ System
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Implementing Web Applications in MLPQ System and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Implementing Web Applications in MLPQ System 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?