GWU CS 184 - Network Programming Architecture

Unformatted text preview:

Jonathan Stanton1Spring 2004 / Lecture 8Network IICS 184Network Programming ArchitectureDepartment of Computer ScienceGeorge Washington UniversityJonathan Stanton2Spring 2004 / Lecture 8• An Engineering Approach to Computer Networkingby S. Keshav.– Chapter 16.• Web Protocols and Practice, by Krishnamurthy andRexford.– Chapter 4 on web server architecture.– Chapter 8 on HTTP/TCP interaction (last Thursdaylecture).• A Design Framework for Highly Concurrent Systemsby M. Welsh, S. Gribble, E. Brewer, and D. Culler.Additional ResourcesJonathan Stanton3Spring 2004 / Lecture 8Today’s Program• Network protocol programming architectures• Server architectures– Discussion of Design Framework paper– Class design of web serverJonathan Stanton4Spring 2004 / Lecture 8What is the Network-ApplicationInterface?• Methods through which a program and a networkprotocol interact:– Involves API’s– Semantics– Architecture• Many different interfaces exist -- thousands.• A few are common:– BSD Sockets– Windows WinsockJonathan Stanton5Spring 2004 / Lecture 8Some numbers• Packet Processing times– Assume 1500 byte packet– Np = R/1500• Np = number of packets received per second– PPt = 1/Np• PPt = Packet Processing Time, how much time can be spent at moston each packetPPtRate ( R )40 s100 Mbps4ms1 Mbps40ms100 Kbps400ms10 KbpsJonathan Stanton6Spring 2004 / Lecture 8Some numbersOS and Packet Processing costsAthlon 1.6GHz Linux• User-to-kernel context switch ~1.0 s• System call ~0.4s• Copying the packet ~25 s• Checksum in software ~40 s• Checksum in hardware ~100 ns.Jonathan Stanton7Spring 2004 / Lecture 8Protocol implementation• Depends on structure and environment• Structure– partitioning of functionality between user and kernel– separation of layer processing (interface)• Environment– data copy cost– interrupt overhead– context switch time– latency in accessing memory– cache effectsJonathan Stanton8Spring 2004 / Lecture 8Partitioning strategies• How much to put in user space, and how much inkernel space?– tradeoff between• software engineering• customizability• security• performance• Monolithic in kernel space• Monolithic in user space• Per-process in user spaceJonathan Stanton9Spring 2004 / Lecture 8Monolithic strategiesKernelUser SpaceJonathan Stanton10Spring 2004 / Lecture 8Per-process in user spaceJonathan Stanton11Spring 2004 / Lecture 8Interfaces• Single-context• Tasks• UpcallsJonathan Stanton12Spring 2004 / Lecture 8Single contextJonathan Stanton13Spring 2004 / Lecture 8TasksJonathan Stanton14Spring 2004 / Lecture 8UpcallsJonathan Stanton15Spring 2004 / Lecture 8Server Design• Based on paper from homework.• Motivation -- Internet servers have:• High Concurrency, Burstiness, Continuous demand, Human-scaleaccess latency.• Major elements:– Tasks– Thread pools– Queues• Design Patterns– Wrapper– Pipeline– Combine– ReplicateJonathan Stanton16Spring 2004 / Lecture 8Class DiscussionHow would you design a complex web applicationserver using this framework?1. List required components to accomplish tasks.2. Decide on relationships between components.3. Calculate available resources for each task.4. Based on relationship and resource constraints,select a processing path that accomplishes the tasks.5. Assign Queues and Thread pools to tasks to bufferload and utilize resources.Jonathan Stanton17Spring 2004 / Lecture 8Information Slide• Lecture slides can be obtained at the course


View Full Document

GWU CS 184 - Network Programming Architecture

Download Network Programming Architecture
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 Network Programming Architecture 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 Network Programming Architecture 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?