was the Internet, and the only host computers on the Internet were UNIX
and all was peaceful and calm (and peer-to-peer, by the way)
and the UNIX weenies ruled supreme
until the Web browser and Web server were invented and the Internet became the the playground of the masses
so where did Client/Server come from ?
it was a revenue model developed by networking companies (Microsoft, Novell, etc) at the insistence of Corporate America
easier to manage centralized data centers
client/server model fit business applications
replace expensive mainframe computers with cheap desktop PCs accessing databases on cheap (relatively) PCs
clients and servers
As C/S developed most of the big projects failed
databases weren’t fast enough or scaleable enough
solution: move the database servers to UNIX (its faster) ; UNIX’s networking environment was based on TCP/IP so the desktop clients were given a TCP/IP stack (enter winsock.dll, Novell’s DOS based stack )
the intranet becomes heterogeneous
The web browser becomes the GUI of choice for corporate America (and elsewhere…)
on every desktop
easy to develop applications with
The Internet and intranets grow like wildfire and the Client/Server model becomes the predominate application model
Corporate America loves it
resembles the old data center model
centralized data and control over data
big servers and server farms
Someone decides they want to be in charge of their own data, and exchange it with whoever they want to.
By the way, this could be done on the original Internet because all of the UNIX hosts had FTP clients and servers.
Enter : Peer-to-peer
Napster, Gnutella and FreeNet to name a few
What is it...
Peer-to-peer computing is the sharing of computer resources and services by direct exchange between systems.
These resources and services include the exchange of information, processing cycles, cache storage, and disk storage for files.
Peer-to-peer computing takes advantage of existing desktop computing power and networking connectivity, allowing economical clients to leverage their collective power to benefit the entire enterprise.
In a peer-to-peer architecture, computers that have traditionally been used solely as clients communicate directly among themselves and can act as both clients and servers, assuming whatever role is most efficient for the network.
Is this really new?
The Original Internet was all P2P
Windows for Workgroups (W4W)
Corporate data centers hated W4W
it was unmanageable
user’s loved it; they didn’t need the data center
they could share data with each other
they could share their desktop printers
IRC (Internet Relay Chat)
users thought they were chatting with each other (P2P) but under the covers it was really C/S, but it helped instill the P2P mindset
What is driving P2P?
Reduced the load on servers
allows them to perform specialized services (such as mail-list generation, billing, etc.) more effectively
can reduce the need for IT organizations to grow parts of its infrastructure in order to support certain services, such as backup storage.
inexpensive computing power
unused mips on desktop computers
Unused storage on desktop
P2P servents/clients of note
uses a central server for users to find one another but straight P2P to exchange files
a technology not a specific client
old store and forward
anonymous file sharing
no central control
no easy way to delete a files from the system
has its own protocol
How Gnutella exchanges data
Gnutella HTTP Client HTTP Server HTTP Client HTTP Server HTTP Client HTTP Server
Similar to Gnutella in that files are transferred using HTTP or HTTPS
Files must be prepared before serving
a meta info file is created (.torrent file)
.torrent files are always encrypted for transfer (insures privacy)
contains hashing info for blocks of the file to be shared
also contains a list of URLs for “trackers”
.torrent is placed on web server and served as regular file
need to have application/x-bittorrent .torrent added to mime types
must also be regiatered in browser to kick of the BitTorrent client app.
User must find .torrents via web searches
user clicks on link to .torrent
browser activates client
client connects to tracker in .torrent file
Tracker lets client know where other clients are
Download starts with some arbitrary part of the file
Once you have started downloading parts of the file the tracker gives your name out to others so that you will also be uploading parts of the file to your peers.
Users are encouraged to stay connected to the system after their download is complete so as to not interfere with others downloads
The web site is serving up static files as normal, but kicking off the BitTorrent helper app on the clients.
The tracker is receiving information from all downloaders and giving them random lists of peers. This is done over HTTP or HTTPS.
Downloaders are periodically checking in with the tracker to keep it informed of their progress, and are uploading to and downloading from each other via direct connections. These connections use the BitTorrent peer protocol, which operates over TCP.
The origin is uploading but not downloading at all, since it has the entire file. The origin is necessary to get the entire file into the network. Often for popular downloads the origin can be taken down after a while since several downloads may have completed and been left running indefinitely.
Client ports : 6881 – 6889
Server ports: 80(HTTP) or 443(HTTPS)
Home page: http://bittorrent.com
P2P with JINI
JINI is Suns technology for Impromptu networks
under the covers JINI is RMI
when servant is started it bootstraps (registers) itself with the JINI lookup service (just like an RMI server)
the lookup service stores remote references to the peers on the network
peers then use RMI to connect directly to one another
This is a brokered approach, similar to Napster
main difference is Napster’s brokering is done using a server and a database where this is using the RMI/JINI lookup service.
If the registry drops off line the there is no service unless every servant can start up a registry if one can’t be found.
P2P with Multicast Sockets
The main problem with the JINI/RMI implementation of P2P is the registry; it is a single point of failure I.e. if the registry goes down then the P2P network is dead. No one can find a peer.
Enter Multicast sockets
similar to UDP (sends datagrams) but sends them multicast
sender part of servant periodically broadcasts its presence
receiver part of other servants receive the datagram and add the peer to their list of peers currently on line
(this is like JINIs lease concept) if the receivers stop receiving the “I’m here” message from a peer the assumption will be that the peer has left the network and the missing peer can be removed from the list of peers currently on line.
Peers can communicate directly with one another using either TCP or UDP.
P2P with JXTA
Created by SUN in response to growing popularity of P2P
Attempts to sole the following P2P problems
Security/Authentication: large p2p applications like AOL IMr and MSN IMr use central servers to bootstrap users onto the network. This helps insure that a particular user uses a particular online identity.
Peer Discovery: realizing the presence of your peers is difficult, multicast on the surface looks good but doesn’t work well outside of the LAN environment
Network Incompatibility: currently each p2p product ends up with its own set of protocols thereby allowing no interoperability
Platform Incompatibility: developers must rewrith low level aspects of their p2p apps for each platform. Wireless and mobile devices have a very limited menu of p2p tools.
How do you do this?
Standardize the low level protocols
JXTA is designed to be a general infrastructure
because all JXTA apps use the same low level protocols they will all be compatible
JXTA networks consist of 3 basic entity types
any peer that uses JXTA protocols
advertisements : XML documents to replace the JINI Multicast function
pipes/messages : one-way communication channels
JXTA is still under development and is still resolving all of the problem areas.