Title: IIS 6
1IIS 6
- Throw it out and start over
2Kernel and Applications
Word
Firefox
Outlook
Kernel
Disk Cache
diskdriver
videodriver
ethernetdriver
3What is the Kernel?
- Support for devices, file systems, network, and
video - Manages memory, programs, files
- Object for each running program, thread, open
file, network connection, loaded module - Extended by installing drivers
- Configured in the registry
4Windows services from DLLs that call the Kernel
DLL
DLL
DLL
DLL
Application Program
Kernel
5Windows vrs Kernel
- Case insensitive file names
- Disk Letters
- stream of bytes
- Unicode case sensitive file names
- Devices and partitions
- sectors, buffers, commands
- Processors
- Real memory
- PnP, power mgmt
6Kernel Environment
- Programs don't see it
- Call to Kernel routine makes Kernel data visible
- All objects for all programs (process, thread,
module, memory, devices, open files) visible in
one place - No end-user services
7Windows NT 3.1
WindowsFile Server
Open Access Control
Kernel
file server support
file system
DISK CACHE
ReadWrite
Ethernet
disk driver
8A Browser Request Arrives(Windows or Unix)
Kernel
Ethernet
Addressed to this machine?What protocol?
9Browser Request Processing(Windows or Unix)
Kernel
Addressed to this machine?What port
(application)?
TCP/IP
Ethernet
10Browser Request Processing(Windows or Unix)
IIS 5 or Apache
What virtual directory?
Port 80
Kernel
TCP/IP
Ethernet
11Browser Request Processing(Windows or Unix)
IIS 5 or Apache
Tomcat
/uPortal
Kernel
TCP/IP
Ethernet
12Browser Request ProcessingWindows Server 2003
Kernel
Addressed to this machine?What port
(application)?
TCP/IP
Ethernet
13Browser Request ProcessingWindows Server 2003
Kernel
HTTP.SYS
TCP/IP
Port 80
Ethernet
14HTTP Request Headers
PORT 80
Application
Mapped Extension
GET /ponies/aqueduct/race2/odds.xyz
HTTP/1.1Host www.handicap.yale.edu...
Virtual Host
15IIS Web "Sites"
16HTTP.SYS
- Called by TCP/IP when data arrives on a port
associated with IIS - Reads HTTP headers into Kernel memory
- Maps porthostnameapplication to a running
process - Passes request to that process
17ISAPI
ApplicationProcess
some.dll
Kernel
HTTP.SYS
18Low Level API for Servers
19High Level API for Servers
- ISAPI
- ASP.NET
- mod_xxx
- PHP, ...
- Servlet
- JSP, Taglib, JSF, ...
20ISAPI
- ActiveX (object based system api)
- Filters
- A DLL configured for a Site that scans all
requests - Extensions
- A DLL configured by application that receives
requests based on the URL file extension
21Configure ISAPI Mappings
22ISAPI in IIS 5
App
Apps
IIS
Extension
Filter
Extension
Extension
Kernel
TCP/IP
Ethernet
23ISAPI in IIS 6
App
App
App
Extension
Extension
filter
filter
filter
Kernel
HTTP.SYS
24Web is another File Server
App
Send Back File
Kernel
DISK CACHE
HTTP.SYS
Disk Driver
Ethernet Driver
25Cache (for a time) frequent program response
App
Cache Response
Kernel
URL CACHE
Same URL
HTTP.SYS
Ethernet Driver
26System Architecture
- Web protocols are now part of the kernel
- Process file requests like "net share"
- HTML or XML(WebServices) applications become
normal programs run by the OS processing request
callbacks from the Kernel - No trade off of integrity for performance
- Ordinary program security for Web
- Each Web app has its own process, address space,
userid, permissions, ...
27Restriction until SP 1
- SSL goes up to IIS process before being handed
off to application - In SP 1, Windows Cryptography services extended
to Kernel so HTTP.SYS can do SSL
28IIS 5 Extension Mapping
.asp
.pl
ASP.DLL
ISAPI Perl
ScriptEngine
JS
PL
VBS
29IIS 5 .NET (or IIS 6)
.asp
.pl
.asax, .aspx, ...
ASP.DLL
ISAPI Perl
aspnet_isapi.dll
CLI
ScriptEngine
.NET Framework
JS
PL
VBS
30.NET
- New code format and environment
- CLI is a superset of Java JVM (IKVM translates
Java Jar to .NET DLL/EXE) - Supports all languages
- Access to all Windows services, but much easier
to code than WIN32 - API for Longhorn services
- Mono and Portable.NET run on Unix
31Mapping in the Process
- Get to the Process because of the port,
hostname, and /dirname - Run each Filter
- Try to match file extension to a mapped DLL name.
If found, pass the request to it using ISAPI
protocol - Default match the URL to a file and send it back
32Architecture Again
- Every other Web Server (Apache, Netscape) is
designed as a file server that runs programs on
the side - IIS is an application routing engine that runs
program elements, and the default program if no
other takes control sends files back to the
Browser
33ASP.NET
Codebehind
OnloadOnClick OnMouseOver Event Handlers
lthtmlgt
html extends code
lt/htmlgt
Compile code and HTML into an Application
34Architecture Again
- Classic Web applications run a script (PHP, Perl)
source program - ASP processed HTML text with embedded interpreted
script code - ASP.NET compiles the code and HTML into an
executable module. All program, no data (except
for extern stray files).
35Servlet form of ASP.NET
- Application implements IHttpHandler
- void ProcessRequest(HttpContext)
- HttpContext.Request
- HttpContext.Response
- HttpContext.Application
- HttpContext.Session
- VS "codebehind" applications implement the
interface through library, just as Java server
handles JSP/Taglib transparently
36Recap
.asax, .aspx, ...
ISAPI from the Kernel
aspnet_isapi.dll
HttpContext (Request, Response)
CLI
IHttpHandler
Assembly
codebehind
rt
html
37Microsoft Does It Again
- Dec 7, 1995 - Bill Gates declares the Web as the
future, announces IE integration with Windows GUI - Implementation bugs poked holes in the "sandbox"
causing Security errors - Now IIS 6 does the other end integrating the Web
Server into the OS program services
38Not The Same Problem
- CICS, RPC, CORBA, Named Pipes, J2EE
- Same thing different protocol
- This is what Terminal Servers, Application
Servers, Database Servers, File Servers do - Paradigm shift for Web Server design, but routine
for OS design