Prerequisites: CS 302


CS 474: P2P Systems

Spring 2009

Meeting Times

Lecture and Practice: 12:00 - 12:50 MTuWF, HB 106, HB207


Dr. Razvan Andonie, HB 219-B, Office hours


Taylor, Harrison: From P2P and Grids to Services on the Web, Springer, 2009.



The course gives a broad overview of current techniques used within distributed systems. It has a strong focus on real-world examples that exist today, so if you’ve ever used KaZaA, Morpheus, Limewire, Gnutella, BitTorrent, Skype, or Napster, then this is your chance to find out how they work! There are examples of P2P applications including : Napster, SETI@Home, ICQ, Gnutella, Freenet and JXTA; distributed object systems, e.g. Jini; document oriented computing, e.g. web services; grid computing e.g. Globus Toolkit and OGSA/WSRF; VoIP, e.g. Skype; and P2P TV, e.g. Joost; distributed agents, e.g. JADE.


The Lab is based on Java TCP/IP Sockets and JXTA for Java. JXTA technology is a set of open protocols that allow any connected device on the network ranging from cell phones and wireless PDA's to PC's and servers to communicate and collaborate in a P2P manner.  JXTA peers create a virtual network where any peer can interact with other peers and resources directly even when some of the peers and resources are behind firewalls and NAT's or are on different network transports.


·        Categories of distributed systems and P2P systems

·        Java Network Programming

·        Gnutella, Freenet, Napster, BitTorrent, P2P games

·        RMI, Jini, JXTA

·        Web services, XML, SOAP, WSDL, and UDDI

·        Security in P2P systems

·        Real world P2P applications

·        Grid computing

·        Trust and reputation

·        Virtual communities

·        Skype and P2P TV

·        The copyright issue in P2P file sharing

·        Distributed intelligent agents

Similar Courses

University of Iowa, USA

Universitat Rovira i Virgili, Tarragona, Spain

Harvard University, Cambridge, MA, USA

Cardiff University, U.K.

Technische Universitat Darmstadt, Germany

Student Learning Outcomes

On completion of this course, the student will have:

·         An overview of the structure and design of P2P systems.

·         Applied this knowledge to problems in a range of application areas.

·        Implemented P2P programs in Java using Sockets, JXTA, Jini, or Jade.


The will be no exams. Grading will be based only on attendance, assignments, in-class presentations, and the Final Project:

10% Class Participation
40% Assignments and Presentations
50% Final Project

Grade Distribution:


95 - 100   A

90 - 94     A-

87 - 89     B+

83 - 86     B

80 - 82     B-

77 - 79     C+

73 - 76     C

70 - 72     C-

67 - 69     D+

63 - 66     D

60 - 62     D-

0  - 59      F

Lectures & Projects

The slides for lectures, additional material, and the projects can be found in the shared directory.

Additional Reading

W. Loo: Peer-to-Peer Computing, Springer, 2007. It has some good Java Network Programming examples, which are available on-line.

R. Flenner et al.: Java P2P Unleashed: With JXTA, Web Services, XML, Jini, JavaSpaces, and J2EE, Sams Publishing, 2003. A good overview of the programming tools for P2P systems.

R. Steinmetz and K. Wehrle (Eds): Peer-to-Peer Systems and Applications, Springer, 2005. This is not a traditional textbook, but an overview of P2P research area and a compendium for teaching.

R. Subramanian and B. D. Goodman (Eds.): Peer-to-Peer Computing: The Evolution of a Disruptive Technology, Idea Group Publishing, 2005. A compendium filled with practical ideas.

K. L. Calvert and M. J. Donahoo: TCP/IP Sockets in Java, Morgan Kaufmann, 2008 (2nd Edition). An excellent practical guide.

Joseph D. Gradecki: Mastering JXTA: A Building Java Peer-to-Peer Applications, Wiley, 2002. It is a practical guide to how to build P2P applications using Java. This is the book I recommend for this class. It is available on-line.

Brendon J. Wilson: JXTA, New Riders Publishing, 2002. This is a more advanced guide.

Daniel Brookshier, Darren Govoni, Navaneeth Krishan: JXTA: Java P2P Programming, SAMS Publishing, 2002. An excellent introduction to JXTA.

Scott Oaks, Bernard Traversat, Li Gong: JXTA in a Nutshell, O’Reilly, 2002. It is more like a handbook.

Survey on P2P systems and books providing comprehensive coverage on the P2P technologies are few and far apart. The fact that P2P is still a rapidly evolving field makes the relative lack of such materials even more critical. Also, adequate teaching material for classes and lectures on P2P systems, covering the whole fields is not currently available.

Lab Software

The site includes specifications, implementations, and the infrastructure to jump-start collaboration among peers. To install and use JXTA for Java SE/EE (JXSE) 2.5 "Turducken", first read the JXSE Progr. Guide, then go to Download. The on-line JavaDoc documentation for the JXTA JXSE API is available at:

Other Software

Peer-to-Peer Programming with WCF and .NET Framework 3.5.

The Chord project.

The Bamboo Distributed Hash Table.


Final Projects

Final Project Guidelines

A list of existing JXTA applications can be found at

The final project is to be completed in groups of two, or individually. The project should be submitted as a report and presented in class. The report should contain the problem description, the code, the benchmarking, and a discussion. For a good presentation, read Quinn's effective presentation techniques guidelines. Each student should be prepared to spend 30-50 hours for the final project. Some projects may be continued as CS 495 Individual Study (Research).

Grading criteria: 10% Difficulty of the project, 50% Submitted document, 40% Presentation.

Final Projects from Previous Years


William Lockwood: A Java-based peer-to-peer network with zero-configuration file sharing.

Nathan Woods, Adam Mahlum: P2P Library System.

Michael May, Richard Chatterton: Java Socket Chat.

Zacharias Thompson, Daniel Garcia: P2P File sharing with JXTA.

Andrew Kellberg: JXTA P2P Auction System.


Shahzada Mansoor: P2P system based on brokered architecture.

Brandon Wysocki, Benjamin Sisson: GUI for the ANTS Need This overlay P2P network.

Brandon Carroll: Web caching system using the BitTorrent Protocol.

Kasey Loomis: Asteroids and YOU.

Steven Curtis: JINI peerless P2P chat.


Lukas Magill, Christopher B. Abdul-Wahid, Benjamin Woodard: Dynamic allocation of objects with partial replication over a P2P network.

Michael Wilson, Sorin Bucse, Shuford Robert: P2P file sharing system.

Luke Arntson, Robb Berry: P2P Tetris game.

Jonathan Thorsvik, Allison Wintrip, Tadashi Kuroishi: A remote Jini disk file storage service.

Course Schedule








Categories of Distributed  Systems

Chapter 1


Java Network Programming: UDP, TCP, HTTP,  Sockets

Chapter 2, Lab Examples & Docs (shared directory)

All About Sockets (Sun), Java Sockets (IBM), HTTP-based Applications (Sun), Java Network Programming Q&A,


P2P Environments

Chapter 6



Chapter 14


P2P Deployment using JXTA

Chapter 21


P2P Deployment using JXTA

Chapter 21


Lab: Experiment with the JXTA Shell. Run the  "Hello world" application  from the JXSE Tutorial (shared directory)


JXSE Progr. Guide (shared directory)

JXTA GettingStarted (shared directory)


Structured Document Types, Web Services

Chapters 3, 7


Web Services Protocols and Deployment

Chapters 16, 22



Chapter 14


Distributed Object Deployment Using Jini

Chapter 20



Chapter 6



Chapter 11



Chapter 4



Chapter 12


Grid Computing

Chapter 9



Chapter 17


Building Highly-Dynamic Battlefield Network Infrastructure Using JXTA

Slides by Dr. Traversat; Boeing presentation



Chapter 13








Distributed Intelligent Agents: JADE

White Paper


Memorial Day Holiday



Trust and Reputation



P2P Technology and the Copyright Crossroads

Electronic Frontier Foundation


Lab: Final Project


Lab: Final Project


Project Presentations


Project Presentations 12:00-2:00


Laboratory Schedule



Item Due


Setup; Project 1



Project 2

Project 1 due


Project 3

Project 2 due


Experiment with JXTA pipe. Run the  Pipe Client/Server application  from the JXSE 2.5 Tutorial (shared directory)

Project 3 due

JXSE Progr. Guide and code (shared directory)


Experiment with JXTA socket. Run the  socket application  from the JXSE 2.5 Tutorial (shared directory)

JXSE Progr. Guide and code (shared directory)


Final Project


Final Project


Final Project


Final Project

Honor Code: All work turned in for credit, including exams and all components of the project, are to be the work of the student whose name is on the exam or project. For all project components, the student can receive assistance from individuals other than the instructor only to ascertain the cause of errors. Thus you can get help if you need it to figure out why something doesn't work. You just can't get help from anyone, other than the instructor or TA, to figure out how to make something work. All solutions turned in for credit are to be your individual work and should demonstrate your problem solving skills, not someone else's. The following text should appear on all assignments: “I pledge that I have neither given nor received help from anyone other than the instructor for all program components included here.

Help each other understand and debug the programming assignments. However, you should write the code for your programs yourself. Writing it yourself is the only way you will learn. Do not work together to solve the programming assignments to the extent that two programs are essentially the same solution. All program solutions turned in for credit are to be your individual work and should demonstrate your problem solving skills, not someone else's. Since everyone is writing their own code, no two programs should be the same or so similar that I could convert one to the other by a simple mechanical transformation (e.g. changing variable names and comments). I consider this plagiarism and a violation of academic code.

First violation: Students must meet with the instructor. In most cases, the grade will be split between the authors of the copied programs. Second violation: Students will receive no credit for the assignment. An incident letter will be placed on file in the Computer Science Department and the matter referred to the Computer Science Department Chair.

Class Attendance: Class attendance is expected and recorded.

ADA Statement: Students with disabilities who wish to set up academic adjustment in this class should give me a copy of their "Confirmation of Eligibility for Academic Adjustment" from the Disability Support Services Office as soon as possible so we can discuss how the approved adjustment will be implemented in this class. Students without this form should contact the Disability Support Services Office, Buillon 205 or or 963-2171.

Caveat: The schedule and procedures for this course are subject to change. It is the student's responsibility to learn of and adjust to changes.