lecture9

lecture9 - Sheet1 Page 1 ----------------------- Page

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Sheet1 Page 1 ----------------------- Page 1----------------------- CSE 135 Web Server Languages Lecture # 9 Chapter 10 Server Modules and Filters ----------------------- Page 2----------------------- CSE 135 Web Server Languages Lecture # 9 Basic Definitions & A server API program is a program which is written to tightly link into a Web server and runs inside the server process. Given this coupling these programs can access the various stages of an HTTP request as it is received, handled and returned & Server API programs are very specific to the server they are running on and are generally named for the particular server they work with Ex: Apache Modules, ISAPI Extensions, ISAPI Filters, NSAPI plugins, etc. ----------------------- Page 3----------------------- CSE 135 Web Server Languages Lecture # 9 Motivations & The reasons you would want to use a server API program are two fold 1. You need very low level access to the request and response stream to perform some useful function such as transformation 2. You need the performance that this programming model provides & The reasons you& d want to avoid this aproach 1. Complexity 2. Safety ----------------------- Page 4----------------------- CSE 135 Web Server Languages Lecture # 9 Triggers & Some server API modules are transparent and will be put in some stage of the request/response lifecycle looking at Sheet1 Page 2 all the data coming by x f Such programs are generally called Filters and there may be a number oF them modiFying some or all requests and responses in a particular deFined order & Others are trigger by some eXternal indicator generally path (URI requested) or File eXtension (eX. content handlers) x f ilters oF course can be written to select what to operate on by such triggers as well x f BTW server-side Frameworks generally implemented as eXtensions, Filters or a combo oF both! (eX. ASP.NET, PHP, etc.) ----------------------- Page 5----------------------- CSE 135 Web Server Languages Lecture # 9 ilter Order & Given that Filters oFten change content the order to which they are applied is pretty important. & As an eXample look at how IIS prioritizes various Filters ----------------------- Page 6----------------------- CSE 135 Web Server Languages Lecture # 9 EXample Uses oF Server API Programs & rameworks & PerFormance Compression dynamically intercepting the data stream and running a gzip on it Injecting headers to improve cachability Re-sampling or reFormatting content For improved delivery & Security Monitoring and dropping inbound requests beFore they get to the application layer Removing dangerous content or scrubbing data on the response Custom authentication (eX. talk to a DB For SSO support) & TransFormation Rewrite URLs or content For security, usability, localization, and so on & Logging Change the Format oF what is recorded Sheet1...
View Full Document

Page1 / 12

lecture9 - Sheet1 Page 1 ----------------------- Page

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online