Docsity

Understanding Distributed Software Development: Networking, Systems, and Protocols, Study notes of Software Engineering

Partial preview of the text

Download Understanding Distributed Software Development: Networking, Systems, and Protocols and more Study notes Software Engineering in PDF only on Docsity!

Distributed Software

Development^ Fundamentals

Chris Brooks Department of Computer ScienceUniversity of San Francisco

Department of Computer Science — University of San Francisco – p. 1/

Outline

-^ Networking overview^ •^

Seven-layer model

-^ Intro to Distributed Systems^ •^

Characteristics • Desirable Properties • Dealing with Time

Department of Computer Science — University of San Francisco – p. 2/

TCP/IP in 30 minutes

-^ Goal: Understand how a network transmits messages atdifferent layers. •^ How is a network composed? •^ What really happens when Firefox opens a connection to aweb server? •^ Note: this will be an overview: for more details, take thenetworking class.

Department of Computer Science — University of San Francisco – p. 4/

Layering

-^ Modern network design takes advantage of the idea of^ layering •^ A particular service or module is constructed as a black box. •^ Users of that service do not need to know its internals, justits interface. •^ This makes it easy to later build new modules (or layers)that use the lower layers. •^ For example, HTTP is built on top of TCP.^ •^

A web browser does not typically need to worry aboutthe implementation of TCP, just that it works.

-^ Unlike OO modules, the layers in a networked systemcomprise protocols that span multiple machines.

Department of Computer Science — University of San Francisco – p. 5/

The OSI seven-layer model

-^ Application •^ Presentation •^ Session •^ Transport •^ Network •^ Data Link •^ Physical

Department of Computer Science — University of San Francisco – p. 7/

Message transmission across layers •^ An application (such as a web browser) wants to send amessage to another computer. •^ That application constructs a message and passes it to theapplication layer. •^ The application layer attaches a header to the message andpasses it to the presentation layer. •^ The presentation layer attaches a header and passes it tothe session layer, and so on.

Department of Computer Science — University of San Francisco – p. 8/

Layers and packets

-^ Each layer constructs a packet containing a portion of thedata to be transmitted. •^ This packet has a data section, and a header.^ •^

The header contains origin and destination information,checksums, sequence numbers, and other identifyinginformation.

-^ When a message is sent by TCP, a packet is constructedand passed down to the IP layer. •^ This entire packet then becomes the data portion of the IPpacket, which is passed down to the network layer, and soon. •^ On the other end, the lowest layer removes the header andchecks the data integrity, then passes the data portion up tothe next layer.

Department of Computer Science — University of San Francisco – p. 10/

Physical Layer

-^ This is the lowest-level layer, responsible for transmitting 0sand 1s. •^ Governs transmission rates, full or half-duplex, etc. •^ A modem works at the physical layer. •^ Lots of interesting problems at this level that we won’t getinto ...

Department of Computer Science — University of San Francisco – p. 11/

Network Layer

-^ The network layer is responsible for routing and flow control. •^ The network layer removes the data link header andexamines the resulting packet for a destination, and thenforwards it as appropriate. •^ the Internet Protocol (IP) is one of the best-knownnetwork-layer protocols. •^ Primary role: move packets from a sending host to areceiving host. This involves:^ •^

Routing: determine the path that a packet should taketo get to its destination. • Forwarding: When an incoming packet is received, placeit on the output link that takes it to the next hop in itsroute.

Department of Computer Science — University of San Francisco – p. 13/

Network Layer

-^ A router contains a

forwarding table

  • when an incoming

packet is received, the router compares it to this table todetermine where to send it next.^ •^ This is forwarding. • These forwarding tables are configured by means of arouting algorithm. • For example, the link-state algorithm is a version ofDjikstra’s algorithm: computes a global routing table. • Internet routing algorithms (such as BGP) are morecomplex, and use a decentralized routing table. • In a nutshell, BGP lets subnets figure out how to reachother subnets via a gateway. That gateway is thenresponsible for routing within the subnet.

Department of Computer Science — University of San Francisco – p. 14/

Session Layer

-^ The session layer was designed to provide support for accessrights and synchronization. •^ In practice, it is not widely used, and is not present in theTCP/IP suite.

Department of Computer Science — University of San Francisco – p. 16/

Presentation Layer

-^ The presentation layer controls display of packetinformation. •^ This may include encryption/decryption, compression,translation between character formats.

Department of Computer Science — University of San Francisco – p. 17/

An example: HTTP

-^ HTTP is the protocol that drives the Web.^ •^

A side note/axe to grind: WWW != Internet!!

-^ It is a stateless protocol that uses TCP as its underlyingprotocol.^ •^

The client sends a request, which is processed by theserver. • The server sends a reply, and the exchange is ended.

Department of Computer Science — University of San Francisco – p. 19/

HTTP requests

-^ HTTP has a very simple message format.^ GET /~brooks/index.html HTTP/1.1Host: www.cs.usfca.eduConnection: closeUser-agent: Mozilla/4.0Accept-language: en •^ You can try this out for yourself with telnet ...

Department of Computer Science — University of San Francisco – p. 20/