Client Side Scripting and Applets Browsers can fetch certain scripts(client-side scripts)or programs along with documents,and execute them in"safe mode"at the client site Javascript Macromedia Flash and Shockwave for animation/games VRML Applets Client-side scripts/programs allow documents to be active E.g.,animation by executing programs at the local site E.g.ensure that values entered by users satisfy some correctness checks Permit flexible interaction with the user. Executing programs at the client site speeds up interaction by avoiding many round trips to server Database System Concepts-5th Edition,Oct 23,2006. 8.12 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.12 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Client Side Scripting and Applets Browsers can fetch certain scripts (client-side scripts) or programs along with documents, and execute them in “safe mode” at the client site Javascript Macromedia Flash and Shockwave for animation/games VRML Applets Client-side scripts/programs allow documents to be active E.g., animation by executing programs at the local site E.g. ensure that values entered by users satisfy some correctness checks Permit flexible interaction with the user. Executing programs at the client site speeds up interaction by avoiding many round trips to server
Client Side Scripting and Security Security mechanisms needed to ensure that malicious scripts do not cause damage to the client machine Easy for limited capability scripting languages,harder for general purpose programming languages like Java E.g.Java's security system ensures that the Java applet code does not make any system calls directly Disallows dangerous actions such as file writes Notifies the user about potentially dangerous actions,and allows the option to abort the program or to continue execution. Database System Concepts-5th Edition,Oct 23,2006. 8.13 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.13 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Client Side Scripting and Security Security mechanisms needed to ensure that malicious scripts do not cause damage to the client machine Easy for limited capability scripting languages, harder for general purpose programming languages like Java E.g. Java’s security system ensures that the Java applet code does not make any system calls directly Disallows dangerous actions such as file writes Notifies the user about potentially dangerous actions, and allows the option to abort the program or to continue execution
Web Servers A Web server can easily serve as a front end to a variety of information services. The document name in a URL may identify an executable program,that,when run,generates a HTML document. When a HTTP server receives a request for such a document,it executes the program,and sends back the HTML document that is generated. The Web client can pass extra arguments with the name of the document. To install a new service on the Web,one simply needs to create and install an executable that provides that service. The Web browser provides a graphical user interface to the information service. Common Gateway Interface(CGl):a standard interface between web and application server Database System Concepts-5th Edition,Oct 23,2006. 8.14 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.14 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Web Servers A Web server can easily serve as a front end to a variety of information services. The document name in a URL may identify an executable program, that, when run, generates a HTML document. When a HTTP server receives a request for such a document, it executes the program, and sends back the HTML document that is generated. The Web client can pass extra arguments with the name of the document. To install a new service on the Web, one simply needs to create and install an executable that provides that service. The Web browser provides a graphical user interface to the information service. Common Gateway Interface (CGI): a standard interface between web and application server
Three-Tier Web Architecture web server network application server database server HTTP browser data server Database System Concepts-5th Edition,Oct 23,2006. 8.15 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.15 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Three-Tier Web Architecture
Two-Tier Web Architecture Multiple levels of indirection have overheads Alternative:two-tier architecture network web server and application server database server HTTP browser data server Database System Concepts-5th Edition,Oct 23,2006. 8.16 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.16 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Two-Tier Web Architecture Multiple levels of indirection have overheads Alternative: two-tier architecture