Understanding the Layers of Computer Systems Architecture

Slide Note
Embed
Share

Explore the intricacies and responsibilities of the Session, Presentation, and Application layers in computer systems architecture. From user identification to data presentation and network programming, delve into the critical functions and challenges faced at each layer. Gain insights into the importance of structuring code for maintainability and the role of interception points in network programming.


Uploaded on Sep 24, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Session, Presentation, and Application Layers David Ferry CSCI 2510 Principles of Computer Systems Saint Louis University St. Louis, MO 63103 1

  2. Recall: 7-Layer OSI Model Application to Application Application Application Presentation Presentation Session Session Entity to Entity User Space Transport Transport Socket to Socket Kernel Space Network Network Interface to Interface Data-Link Data-Link Sockets/ TcpStream Hardware to Hardware Physical Physical Physical Connection Last time: The socket endpoint allows passing arbitrary byte- oriented data from process to process. Today: How does user space use that? Some notes on software architecture for networked applications. CSCI 2510 - Principles of Comp. Systems 2

  3. Session Layer A user should not be distinguished by their connection! Consider what happens when you browse a web commerce site while you walk from off campus to on campus You connect over many networks that carrying your data over multiple interfaces from multiple IP addresses, but the website doesn t flinch You may even connect from multiple applications- i.e. web browser versus smartphone app This layer is responsible for establishing and reacting appropriately to your specific identity. E.g. Cookies, single sign on (SSO) CSCI 2510 - Principles of Comp. Systems 3

  4. Presentation Layer Suppose you re working on a software project where multiple programmers are writing network code, and they all write something like this: let buffer = format!( message ); stream.write( buffer ); This code is hard to maintain and modify What if you re moving from beta to production and you want to add encryption or compression to every connection? CSCI 2510 - Principles of Comp. Systems 4

  5. Presentation Architecture You, the intelligent network programmer, insist that all of your coworkers use a function called sendOverNet and recvOverNet: let buffer = format!( message ); net_send( stream, &buffer ); fn net_send( stream: &mut TcpStream, buffer: &[u8] ){ stream.write( buffer ); } This gives you an interception point CSCI 2510 - Principles of Comp. Systems 5

  6. Interception Points fn net_send( stream: &mut TcpStream, buffer: &[u8] ){ stream.write( buffer ); } fn net_recv( stream: &mut TcpStream, buffer: &mut [u8] ) -> usize { let bytes_read = stream.read( buffer ); return bytes_read; } CSCI 2510 - Principles of Comp. Systems 6

  7. Interception Points fn net_send( stream: &mut TcpStream, buffer: &[u8] ){ encrypt( buffer, key ); stream.write( buffer ); } fn net_recv( stream: &mut TcpStream, buffer: &mut [u8] ) -> usize { let bytes_read = stream.read( buffer ); decrypt( buffer, key ); return bytes_read; } CSCI 2510 - Principles of Comp. Systems 7

  8. Interception Points fn net_send( stream: &mut TcpStream, buffer: &[u8] ){ compress( buffer ); encrypt( buffer, key ); stream.write( buffer ); } fn net_recv( stream: &mut TcpStream, buffer: &mut [u8] ) -> usize { let bytes_read = stream.read( buffer ); decrypt( buffer, key ); decompress( buffer ); return bytes_read; } Presentation layer techniques provide a single, unified set of transformations between the application and the network. 8

  9. Application Layer Application layer protocols are diverse and varied. E.g. (simplified): DNS (domain name resolution) a client sends a domain name like google.com and the DNS server sends back the IP address or an error HTTP a client sends the name of a resource like cs.slu.edu/index.html or cs.slu.edu/slu.png and the web server sends back the requested resource or an error CSCI 2510 - Principles of Comp. Systems 9

  10. Networking Conclusion Important to remember that the OSI model is just a model It fits all of the major networking pieces together, but it is not accurate or complete All models are wrong, but some models are useful. George Box See also: the TCP/IP model- more systems oriented We study this model to understand the major pieces are and how they interact, so that you can apply this knowledge in the context of real networks Lots of arguments about what exact feature or protocol belongs in which layer No place to directly address our cross-cutting concerns like security and efficiency CSCI 2510 - Principles of Comp. Systems 10

Related


More Related Content