COMS W3156: Software Engineering, Fall 2001 - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

COMS W3156: Software Engineering, Fall 2001

Description:

Recitation tomorrow: most likely early afternoon ... We'll have to return assignments tomorrow. Requirements will be out tomorrow night, barring unforeseen problems ... – PowerPoint PPT presentation

Number of Views:1926
Avg rating:3.0/5.0
Slides: 30
Provided by: janakj
Category:

less

Transcript and Presenter's Notes

Title: COMS W3156: Software Engineering, Fall 2001


1
COMS W3156Software Engineering, Fall 2001
  • Lecture 5 Tools and Networking
  • Janak J Parekh
  • janak_at_cs.columbia.edu

2
Administrativia
  • Recitation tomorrow most likely early afternoon
  • Permanent time yet to be set (hopefully by
    classtime)
  • Late group proposals
  • Well have to return assignments tomorrow
  • Requirements will be out tomorrow night, barring
    unforeseen problems
  • Notes going out between noon and 1pm, soon 9am

3
Next class
  • We go object-oriented in a big way
  • Read UML chapters 3-5, Schach chapter 12
  • Object-oriented specification using UML
    technologies what you will be doing for the next
    milestone
  • Were skipping around to prepare for milestones
  • Might want to consider reading chapters 1-2 of
    UML pretty short, useful intro

4
Todays class
  • Finish up chapter 5 analytical tools
  • Networking basics

5
Stepwise refinement (I)
  • Based on the principle of functional abstraction
  • Worry about the high-level details first, smaller
    problems can be dealt with later
  • Useful for specification, design and
    implementation
  • In implementation, though, you sometimes need the
    smaller pieces first

6
Stepwise refinement (II)
  • Purchase order system
  • Add purchase orders
  • Edit/delete purchase orders
  • Print purchase orders
  • Fulfill purchase orders
  • Now, drill down one level

7
Stepwise refinement (III)
  • Add purchase orders
  • Get input from user
  • Validate input
  • Compute totals on PO
  • Add to database
  • Edit/delete similar to previous
  • Print purchase orders
  • Request which to print from user
  • Format for printout
  • Print

8
Stepwise refinement (IV)
  • Fulfill purchase orders
  • Identify purchase order to fulfill
  • Have user enter quantity shipped
  • Determine if purchase order is completely
    fulfilled
  • Now, one drills down, and down, and down
  • I dont particularly like Schachs example, but
    the process is valid

9
Cost-benefit analysis
  • Is it worth computerizing? Not always
  • Not straightforward intangible benefits
  • Need to make assumptions
  • Complex science, mostly outside of the scope of
    this course well touch upon it during chapter 9

10
Software metrics (I)
  • Many different kinds
  • Lines of code (LOC), or thousand-lines-of-code
    (KLOC)
  • MTBF
  • Person-months of work, turnover
  • etc.

11
Software metrics (II)
  • Five fundamental metrics
  • Size (KLOC others in chapter 9)
  • Cost ()
  • Duration (months)
  • Effort (person-months)
  • Quality ( of faults detected)
  • Must be measured per each phase
  • Note Metrics are controversial

12
Networking
  • Introduction to networking essentials
  • History and background
  • Layers of networking abstraction
  • LAN networks Ethernet
  • WAN networks Internet
  • TCP/IP addressing, routing, transmission, DNS
  • Socket programming
  • See http//www.novell.com/info/primer/primer.html
  • How much do you know?

13
History and background
  • We define modern computer networks to be
    packet-based networks encapsulate data in
    small packets that are sent out one-at-a-time
  • Compare to a telephone, which has a complete
    circuit you can include many more parties in the
    conversation
  • This stemmed out of DARPA research ARPAnet in
    the 70s and 80s
  • TCP/IP eventually made public, led to Internet

14
Networking abstraction
  • Similar to functional abstraction, but slightly
    different
  • Many different models OSI reference model
  • Most include (example)
  • physical/hardware electric signals (Ethernet)
  • network deal with nodes addressing (IP)
  • transport transmit data efficiently and reliably
    (TCP)
  • application allow programs to communicate
    (sockets)
  • Protocol language on many different levels
    www.ietf.org

15
LAN Ethernet
  • Physical and electronic transmission medium
  • Very cheap and popular, available in 10, 100, and
    1000Mbps varieties
  • Communication via CSMA/CD
  • Shout the message to everyone else
  • If confusion, shut up for a bit, then try again
  • Many, many others

16
WAN Internet
  • Really not analogous to Ethernet
  • Once known as the ARPAnet
  • Internet comprised of many local networks
    interconnected using large telecommunication
    links
  • Links generally digital-circuit-based, over which
    packet-based networks are run
  • http//www.cs.bell-labs.com/who/ches/map/gallery/i
    sp-ss.gif

17
TCP/IP
  • Transmission Control Protocol/Internet Protocol
  • Its a misnomer
  • IP is solely responsible for addressing and
    routing computers across the Internet
  • TCP is a means of transmitting data over IP, and
    not the only one (UDP, ICMP, GRE, )
  • IP is the most popular protocol today
  • Current version is IPv4, but new one out (IPv6)

18
IPv4 (I)
  • Addressing and routing protocol
  • Defines packets to be delivered to or routed
    between machines
  • Each node on an IPv4 network has a 4-byte address
  • Commonly represented using quad notation, e.g.
    www.xxx.yyy.zzz

19
IPv4 (II)
  • Each packet contains source IP address,
    destination IP address, checksum, length, and
    other fields
  • Gruesome details at http//www.ietf.org/rfc/rfc079
    1.txt?number0791
  • This is a request-for-comment (not anymore for
    IP) all standard Internet protocols are defined
    by an RFC
  • John Postel father of the Internet
  • IP will attempt to deliver this packet for you to
    the destination node

20
Subnets and routing (I)
  • How can IP deliver? Two possibilities
  • Target machine is locally reachable, i.e.,
    connected via LAN
  • Give that machine the packet
  • Target machine is not local
  • Give the packet to a router, i.e., a machine that
    knows where it should go
  • Subnetting determines which machines are local
    and which arent

21
Subnets and routing (II)
Janakscomputer
Other Columbia networks
CS network (128.59.16.0-128.59.23.255)
Router
Router
Router
Columbias network (128.59.x.y)
Big-ass router
Big-ass router
note this isstrictly approximate
OC3(155Mbps)
OC3(155Mbps)
Applied Theory andthe Internet
Internet2(other research inst)
22
Subnets and routing (III)
  • tracert/traceroute will do what its name implies
  • Uses packet time-to-live field increments it and
    sees how far it goes

23
TCP
  • Transmission Control Protocol
  • Mechanism of handling reliable transmission of
    data over IP connection
  • Packets delivered in order
  • Retransmission if one is not received on the
    other side
  • Ports to handle many connections

24
UDP
  • User Datagram Protocol
  • Not connection-oriented send the packet and
    forget about it if the other side doesnt
    receive it, or its out of order, oh well, let
    the program worry about it
  • Also has port construct

25
Servers and services
  • Both UDP and TCP allow for listening to ports
    for incoming data (TCP inbound connections)
  • Common ones include
  • 21 ftp
  • 23 telnet
  • 25 smtp (mail)
  • 80 www
  • 110 pop3
  • Most OSs allow 65,535 ports!
  • Try telnet www.columbia.edu 80

26
Naming computers DNS
  • Domain Name System
  • We have lots of nodes with IP addresses
  • Can you remember 128.59.23.10?
  • Instead, we name each machine (hostname), and
    then have servers that keep track of a
    name-to-IP-address mapping
  • Distributed

27
So, how do you do all this?
  • Well, you could write the packets yourself
  • Instead, we use the operating system (or
    language)s API to automate things
  • Sockets (they plug into ports ?)
  • http//web2.java.sun.com/docs/books/tutorial/netwo
    rking/sockets/index.html for Java
  • http//world.std.com/jimf/papers/sockets/sockets.
    html for C/C (or Google) - quite a bit trickier

28
Philosophy of socket programming
  • Server
  • Establish a server socket
  • Listen and accept new incoming connections
  • Talk
  • Hangup
  • Repeat
  • Client
  • Create a client socket (or socket)
  • Try to connect to server
  • Talk
  • Hangup
  • Often send strings of data over sockets

29
Lets do it!
Write a Comment
User Comments (0)
About PowerShow.com