12/6/00 Doc 26, Tiers & Peers slide # 1
CS 580 Client-Server Programming Fall Semester, 2000 Doc 26 Tiers & Peers Contents How many Tiers? ...... 2 Client Presentation ...... 3 Peer-to-Peer...... 4 Gnutella...... 5 Multicast Sockets ...... 7 Bluetooth...... 8
References Overview of Two- and Three-Tier Client/Server Architectures Gartner Report, via Governor's Office for Technology, Kentucky, about 1998 http://cdc.state.ky.us/dcs/tiers.htm
Gnutella news http://www.gnutellanews.com/ http://gnutella.wego.com/
Gnutella Protocol 0.04 http://dss.clip2.com/GnutellaProtocol04.pdf
Gnutella: To the Bandwidth Barrier and Beyond, November 6, 2000 http://dss.clip2.com/gnutella.html
Wired P2P Pages, Lists of clients, protocols, etc http://www.wired.com/wired/archive/8.10/p2p_pages.html?pg=1
Independence Array, Jermoe Kuptz, Wired October, 2000, pp. 236-237
Java Network Programming 2nd Ed, Harold, O'Reilly, 2000, chapter14
Bluetooth Web site http://www.bluetooth.com/
Copyright ©, All rights reserved. 2000 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent (http://www.opencontent.org/opl.shtml) license defines the copyright on this document. 12/6/00 Doc 26, Tiers & Peers slide # 2
Odds & Ends How many Tiers?
Typical business application is claimed to have: · Presentation or Display logic & user interaction · Business rules · Data access
Three Tier Client handles presentation Server handles business rule Server gets data from database
Two Tier Client handles presentation and perhaps business rules Server handles data access and perhaps business rules
Thin client only handles presentation
Thick client also handles business rules
Four Tier Presentation Flow control functions Business rules Data access logic 12/6/00 Doc 26, Tiers & Peers slide # 3
Client Presentation
To the user the client is the application
If the user does not like the interface, they do not like the application
See User Interface Design for Programmers an on-line book for user interface design at: http://joel.editthispage.com/stories/storyReader$51
The client is not just a way to send the protocol to the server 12/6/00 Doc 26, Tiers & Peers slide # 4
Peer-to-Peer Back to the future
Peer-to-peer
Clients communicate with other clients directly
Clients are also servers
Why peer-to-peer
Environments that do not have dedicated servers
Lack of system administrator
Ad-hoc networks
Wireless mobile computers
Avoid central control
Some examples
AppleTalk networks Gnutella Bluetooth 12/6/00 Doc 26, Tiers & Peers slide # 5
Gnutella
Created by Justin Frankel & Tom Pepper at AOL's Nullsoft
Posted for a few hours on March 14 2000
The protocol was reversed-engineered
Many clones now exist
Gnutella is a file-sharing program
User lists files to share with their gnutella client
When the client is running other gnutella clients can request copies of your files 12/6/00 Doc 26, Tiers & Peers slide # 6
How it works
Gnutella client starts with locations N other clients
Each client answers the request and sends it on to all clients it knows
TTL (time to live) Number of times a request will be forwarded to another client Maximum TTL is 7
Radius - the clients that are within 7 hops
A radius can have up to 10,000 clients
Protocol does not scale well, but works better than some thought possible
See Gnutella: To the Bandwidth Barrier and Beyond, November 6, 2000 http://dss.clip2.com/gnutella.html for a report on growth of Gnutella networks 12/6/00 Doc 26, Tiers & Peers slide # 7
Multicast Sockets
Unicast sockets
· Provide point-to-point communication · Client needs to know server address
Multicast sockets
· Each multicast address is a group of hosts · Hosts can leave/join the group dynamically · Packets are sent to all hosts in the group · TTL of packet indicates how far a packet will be sent
Jini uses multicast
· Jini network is an ad-hoc network of services & clients · Services use multicast to find a naming service (broker) · Clients use multicast to find a naming service to find services
See http://www.eli.sdsu.edu/courses/spring99/cs696/notes/jiniIntro/j iniIntro.html and http://www.sun.com/jini/index.html for more info on Jini 12/6/00 Doc 26, Tiers & Peers slide # 8
Bluetooth
Wireless ad-hoc network standard
Radio Specs Range 10 meters Frequency band 2.4 Ghz Max Data transfer721kbit/s + 3 voice channels
Packet switching protocol with frequency hopping 1600 hops/second
Piconet · Up to 7 devices connected by radio
Multiple piconets can be linked together dynamically
Uses error correction and encryption
Started by Ericsson, IBM, Intel Corporation, Nokia and Toshiba in 1998
Has wide spread industry support
More popular in Europe