Professor Arthur Goldberg
Computer Science Department, NYU
High quality network programming can contributes critical value to business operations.
For example, ILX grew to be the leading distributor of real-time market data to the financial industry in the 1990s in part because they were one of the few firms that understood how to efficiently distribute data over LANs – they employed UDP multicast. This enabled them to distribute more data to more workstations on slower networks than their competition. (ILX has since been acquired by Thompson Financial.)
As another example, a few years ago a leading investment bank spent multiple person-years optimizing the performance of a trading system that it uses to complete large transactions in a special market that operates only at the end of each quarter. In this market, traders maximize their profits by trading as close as possible to the close of business at about 4 PM. However, transactions that are not completed by 4 PM are completely lost. The optimization effort improved the performance of several interacting network applications (and other programs) thereby reducing a transaction's end-to-end processing time from several minutes to 10 seconds. On its first use, this tuned system enabled the bank to earn millions of dollars in profits on over $2B in trades completed in the last minutes before 4 PM.
Former students of this course have built production Internet or intranet programs for GIST, Citigroup, Morgan Stanley, Deutsche Bank, mail.com, Interworld – a major early Internet startup, and other firms.
To follow in their footsteps, in this course you’ll learn how to write reliable, high-performance, maintainable Internet programs in Java. We'll design and implement the programs on top of the primary Internet programming interfaces in Java's networking package, mainly the socket interfaces. You'll learn how to implement servers, clients and caching proxies (a proxy is simultaneously both a server and a client). We'll also explore peer-to-peer systems.
You'll learn how to read and understand the primary specifications of Internet protocols in the sometimes arcane Requests for Comment (RFC) documents. Your programs that implement part of an RFC will interoperate with standards-compliant production systems.
You'll learn how – and when – to employ the major network communications technologies: packet-based UDP, stream-based TCP, and multicast. Your servers will support multiple concurrent clients via threading, non-blocking IO or a combination of these techniques. Given the importance of network program performance, I'll teach you about tuning network applications.
We'll explore a significant subset of these widely used Internet protocols: the Web's HTTP and HTTPS, email's SMTP, IMAP and POP3, peer-to-peer's Gnutella, and some real-time protocols such as VOIP, etc.
In addition, I'll encourage you to practice skills for writing good code, including the concepts of OO design, and testing TCP programs without a network.
Tuesdays 5:00 PM – 6:50 PM
Update history in 2006: 1/16, 1/17, 1/24, 1/31, 2/3
Office: WWH 409
Email: artg <at> cs.nyu.edu
Office hours: Tues. 2-3, Thurs. 2-3 or by appointment
Course #: G22.3033-004
Kranthi K Gade
kranthi <at> cs.nyu.edu
Please email to schedule appointments
The prerequisites for this course are skills, not particular classes. You should have the ability to program in Java. For example, you should understand Java classes, methods, inheritance, strings and arrays, interfaces, packages, collections, iterators, exception handling, and I/O. In addition, students in this course should
Be capable of writing modest sized programs, 10 to 30 pages long, and have an appetite for reading and studying code;
Have a basic knowledge of networking principles, such as that messages travel from sender to receiver, and contain data in their bodies, Internet hosts have IP addresses, etc.; and
be able to understand formal language descriptions, such as finite state machines and BNF grammars.
If you have difficulty programming, I recommend that you plan to devote more than 20 hour per week to this class.
To acquire the skills I hope you'll learn, you need to carefully design and write network code. To be more specific, you'll need to engage in these activities:
Carefully read a variety of sources that discuss programming, network programming and network protocols. The readings include handouts I author, Internet RFCs, the textbook, example programs, programming manuals, Sun's Java API documentation, and research papers.
Attend class and participate in our discussions about network software design.
Absorb the ideas you're exposed to in the readings and class discussions and incorporate them into your code.
Thoroughly test your software.
The specific assignments are to be determined.
James Kurose and Keith Ross, Computer Networking: A Top-Down Approach Featuring the Internet, Addison Wesley, 3rd edition, 2004, ISBN: 0321227352. Note that we're using the 3rd edition.
Other software texts that you may find useful in your work or future studies:
Douglas Comer, Computer Networks and Internets with Internet Applications, Prentice Hall, ISBN 0130914495. An excellent simple introduction to internetworking, that you can use as a backup if Kurose confuses you.
Comer, D.E. and Stevens, D.L., Internetworking with TCP/IP: Volume III: Client-Server Programming and Applications, BSD socket version, Second Edition, Prentice Hall, ISBN 0-13-260969-X. A detailed reference on socket programming in C. A classic.
Ethan Cerami, Web Services Essentials: Distributed Applications with XML-RPC, SOAP, UDDI & WSDL, 1st Edition February 2002, ISBN: 0-596-00224-6.
Ken Arnold, James Gosling, David Holmes, The Java Programming Language, (3rd Edition), Addison-Wesley Pub Co., ISBN: 0201704331. In my opinion, the best – most concise and technically deep and insightful – introduction to Java, from the inventors.
Merlin Hughes, Michael Shoffner, Derek Hamner, Java Network Programming: A Complete Guide to Networking, Streams, and Distributed Computing, Manning Publications Company; 2nd edition (July 1999), ISBN 188477749X. Very extensive, but somewhat out of date.
Ron Hitchens, Java NIO, O'Reilly; 1st edition (August 15, 2002), ISBN: 0596002882. This is an excellent reference on non-blocking IO.
Steve C McConnell, Code Complete: A Practical Handbook of Software Construction, 2nd edition, 2004, Microsoft Press; ISBN: 0735619670. Although MSFT published it, still the most practical guide to writing good code I know
Assignments will include programming, classroom participation and perhaps an oral exam. I envision 3 to 5 programming assignments. I will try to create assignments that involve the programming skills below. Note that some assignments may cover multiple skills at once.
A multi-threaded server
An NIO server
Secure (SSL) TCP programming
Programming at least one of the major Internet protocols, such as HTTP, POP3, IMAP, SMTP, or FTP
A peer-to-peer system
A real-time system
I circulated a preference questionnaire at the first class. The summarized results indicate significant preferences.
assignments must be emailed to the professor and delivered on paper
so the TA or I can write comments and constructive feedback on it. To
avoid problems with lost emails (“the Internet ate my
homework”) you should save a copy of your email (not simply the
Also, I've had several students lose significant work through system failures. I do not like granting extensions for lost work. Please backup all your files regularly. I think that work in progress should be saved a couple of times an hour, and all modified files should be copied to another machine every day.
Please review and adhere to the CS Department's academic integrity policy.
The distinction between improperly copying, which is cheating, and
creating your own work is quite clear.
A student violates the academic integrity policy when they incorporate multiple lines of code that someone else wrote into their own code. The copying is improper even if the student modifies the code after copying it.
The penalty for cheating depends on the severity of the offense. The following actions all increase the severity of cheating:
Copying more code.
Modifying the code to conceal that it is a copy (i.e., changing the name of the author, or modifying the code by changing variable names, indentation, linebreaks, etc.).
Lying to faculty about whether one cheated.
Taking more NYU faculty or staff time to deal with the cheating.
While the last paragraph of the academic integrity policy says “Departmental policy is to give a grade of F in the course in which the cheating occurred. By the rules of GSAS, the penalty for a second offense is termination from the graduate program.”, depending on the severity of cheating, I may penalize the student with a reduced grade for the assignment on which the cheating occurred, or a grade of F for the course. If I believe a more severe penalty (i.e., probation, suspension or expulsion from NYU) is warranted, I will recommend that the department refer the case to the dean for further action.
All students must register with the class email list, which is used for all technical and logistical discussions concerning the course. To register, go to the following web page, and follow the instructions:
Please send your questions to this list so that everyone may participate in the discussion. To post a message to all the list members, send email to g22_3033_004_sp06 <at> cs.nyu.edu.