Beruflich Dokumente
Kultur Dokumente
SYSTEM
ABSTRACT
Efficient file query is important to the overall performance of peer-to-peer (P2P)
file sharing systems. Clustering peers by their common interests can significantly
enhance the efficiency of file query. Clustering peers by their physical proximity
can also improve file query performance. However, few current works are able to
cluster peers based on both peer interest and physical proximity. Although
structured P2Ps provide higher file query efficiency than unstructured P2Ps, it is
difficult to realize it due to their strictly defined topologies. Proximity-Aware and
Interest-clustered P2P file sharing System (PAIS) is proposed, which is based on a
structured P2P, which forms physically-close nodes into a cluster and further
groups physically-close and common-interest nodes into a subcluster based on a
hierarchical topology. PAIS uses an intelligent file replication algorithm to further
enhance file query efficiency. It creates replicas of files that are frequently
requested by a group of physically close nodes in their location. PAIS enhances the
intra-sub-cluster file searching through several approaches. First, it further
classifies the interest of a sub-cluster to a number of sub-interests, and clusters
common-sub-interest nodes into a group for file sharing. Second, PAIS builds an
overlay for each group that connects lower capacity nodes to higher capacity nodes
for distributed file querying while avoiding node overload. Third, to reduce file
searching delay, PAIS uses proactive file information collection so that a file
requester can know if its requested file is in its nearby nodes. Fourth, to reduce the
overhead of the file information collection, PAIS uses bloom filter based file
information collection and corresponding distributed file searching. Fifth, to
improve the file sharing efficiency, PAIS ranks the bloom filter results in order.
Sixth, considering that a recently visited file tends to be visited again, the bloom
filter based approach is enhanced by only checking the newly added bloom filter
information to reduce file searching delay.
INTRODUCTION
Over the past few years, the immense popularity of the Internet has produced a
significant stimulus to P2P file sharing systems. For example, BitTorrent
constitutes roughly 35% of all traffic on the Internet. There are two classes of P2P
systems: unstructured and structured. Unstructured P2P networks such as Gnutella
and Freenet do not assign responsibility for data to specific nodes. Nodes join and
leave the network according to some loose rules. Currently, unstructured P2P
networks file query method is based on either flooding where the query is
propagated to all the nodes neighbors, or random-walkers where the query is
forwarded to randomly chosen neighbors until the file is found.
However, flooding and random walkers cannot guarantee data location. Structured
P2P networks, i.e. Distributed Hash Tables (DHTs), can overcome the drawbacks
with their features of higher efficiency, scalability, and deterministic data location.
They have strictly controlled topologies, and their data placement and lookup
algorithms are precisely defined based on a DHT data structure and consistent
hashing function. The node responsible for a key can always be found even if the
system is in a continuous state of change.
EXISTING SYSTEM
A key criterion to judge a P2P file sharing system is its file location efficiency.
Super-peer topology
Super-peer topology consists of supernodes with fast connections and
regular nodes with slower connections. A supernode connects with other
supernodes and some regular nodes, and a regular node connects with a
supernode. The nodes at the center of the network are faster and therefore
produce a more reliable and stable backbone. This allows more messages to
be routed than a slower backbone and, therefore, allows greater scalability.
Super-peer networks occupy the middle-ground between centralized and
entirely symmetric P2P networks, and have the potential to combine the
benefits of both centralized and distributed searches.
Disadvantages
A logical proximity abstraction derived from a P2P system does not
necessarily match the physical proximity information in reality.
The shortest path according to the routing protocol is not necessarily the
shortest physical path.
This mismatch becomes a big obstacle for the deployment and performance
optimization of P2P file sharing systems.
Proximity-aware clustering
This can be used to group physically close peers to effectively improve
efficiency. The third class of methods to improve file location efficiency is to
cluster nodes with similar interests, which reduce the file location latency.
Disadvantages
Only few methods are able to cluster peers according to both proximity and
interest
In addition, most of these methods are on unstructured P2P systems that
have no strict policy for topology construction.
They cannot be directly applied to general DHTs in spite of their higher file
location efficiency.
PROPOSED SYSTEM
A Proximity-Aware and Interest clustered P2P file sharing System (PAIS) on
a structured P2P system.
It forms physically-close nodes into a cluster and further groups physicallyclose and common interest nodes into a sub-cluster.
It also places files with the same interests together and make them accessible
through the DHT Lookup() routing function.
It creates replicas of files that are frequently requested by a group of
physically close nodes in their location.
Advantages
Relying on DHT lookup policy rather than broadcasting, the PAIS
construction consumes much less cost in mapping nodes to clusters and
mapping clusters to interest sub-clusters.
PAIS uses an intelligent file replication algorithm to further enhance file
lookup efficiency.
PAIS enhances the intra-sub-cluster file searching through several
approaches.
First, it further classifies the interest of a sub-cluster to a number of
subinterests, and clusters common-sub-interest nodes into a group for file
sharing.
Second, PAIS builds an overlay for each group that connects lower capacity
nodes to higher capacity nodes for distributed file querying while avoiding
node overload.
Third, to reduce file searching delay, PAIS uses proactive file information
collection so that a file requester can know if its requested file is in its
nearby nodes.
Fourth, to reduce the overhead of the file information collection, PAIS uses
bloom filter based file information collection and corresponding distributed
file searching.
Fifth, to improve the file sharing efficiency, PAIS ranks the bloom filter
results in order.
Sixth, considering that a recently visited file tends to be visited again, the
bloom filter based approach is enhanced by only checking the newly added
bloom filter information to reduce file searching delay.
ENHANCEMENT
In the proposed work, file distribution is done between the peers by FILEID and
FILE. The proposed work can be enhanced to provide more user specific search
such as file name and his sub interest. Thus the requester will get his specific file
of his interest. Also this reduces query latency. We can compare the query
processing time, in our enhancement, the query processing time can be reduced
considerably and also the users satisfaction on his interest file reply.
APPLICATIONS USED
Although this work is for P2P file sharing systems, the techniques proposed in this
paper can benefit many current applications such as content delivery networks, P2P
video-on-demand systems, and data sharing in online social networks. Since the
architecture of PAIS is based on a structured P2P system, its architecture cannot be
used for unstructured P2P systems. However, PAISs techniques for enhance
efficiency of the intra-subcluster file searching can be used for unstructured P2P
systems since nodes in a intra-sub-cluster are connected in an unstructured manner.
LITERATURE SUMMARY
Super-peer topology
FastTrack and Morpheus use super-peer topology. The super-peer network is for
efficient and scalable file consistency maintenance in structured P2P systems.
Garbacki et al. proposed a self-organizing super-peer network architecture that
solves four issues in a fully decentralized manner: how client peers are related to
super-peers, how super-peers locate files, how the load is balanced among the
super-peers, and how the system deals with node failures.
Mitra et al. developed an analytical framework, which explains the emergence of
super-peer networks on execution of the commercial P2P bootstrapping protocols
by incoming nodes.
Chordella is a P2P system that is particularly designed for heterogeneous
environments such as wireless networks.
Sachez-Artigaz et al. investigated the feasibility of super-peer ratio maintenance, in
which each peer can decide to be a super-peer independently of each other.
Liu et al. proposed a hierarchical secure load balancing scheme in a P2P cloud
system. It first balances the load among supernodes, and then depends on each
supernode to balance the load among nodes under its management.
Garbacki et al. proposed a self-organizing supernode architecture to facilitate file
querying. Each supernode caches the files recently requested by its children, and
other peers send requests to the supernodes that can solve most of their requests.
Proximity-awareness
Techniques to exploit topology information in P2P overlay routing include
geographic layout, proximity routing, and proximity-neighbor selection.
Genaud et al. proposed a P2P-based middleware for locality-aware resource
discovery.
Some of the work measured the inter-ISP traffic in BitTorrent and indicated the
importance of locality-awareness traffic in reducing the traffic over long-distance
connections.
Guo et al. examined traffic locality in PPLive and revealed that PPLive achieves
high ISP level traffic locality.
Shen and Hwang proposed a locality-aware architecture with resource clustering
and discovery algorithms for efficient and robust resource location in wide-area
distributed grid systems.
Lehrieder et al. studied locality-awareness in scenarios with real-life, skewed peer
distributions and heterogeneous access bandwidths of peers.
Yang et al. combined the structured and unstructured overlays with proximityawareness for P2P networks to ensure the availability of searching results.
Gross et al. proposed a BitTorrent-like downloading scheme with locality-aware
file searching and replication in order to supply a robust and fast downloading.
Manzillo et al. proposed the collaborative locality aware overlay service, which
reduces the transmit cost of ISPs by switching to the source inside the same ISP
with the requester. Interest-base file sharing.
Hang et al. proposed a method for clustering peers that share similar properties
together and a new intelligent query routing strategy.
Crespo et al. proposed a semantic overlay network (SON) based on the semantic
relations among peers.
Ruffo and Schifanella studied the spontaneous communities of users in P2P file
sharing applications and found that a family of structures show self-organized
interest-based clusters.
Iamnitchi et al. found the small world pattern in the interest-sharing community
graphs, and suggested clustering common-interest nodes to improve file searching
efficiency. Some works leverage the social network common-interest property for
efficient file searching.
Cheng et al. proposed NetTube for P2P short video sharing. It clusters users with
the same interests together for efficient peer assisted video delivering.
Li et al. proposed a P2P file sharing system based on social networks, in which
common multi- interest nodes are grouped into a cluster and are connected based
on social relationship.
Lin et al. proposed a social based P2P assisted video sharing system through
friends and acquaintances.
Li et al. grouped users by interests for efficient file querying and used the relevant
judgment of a file to a query to facilitate subsequent same queries.
Liu et al. proposed online storage systems with peer assistance.
HARDWARE REQUIREMENTS
Processor
Ram
: 128Mb.
Hard Disk
: 10 Gb.
Compact Disk
: 650 Mb.
Input device
Output device
SOFTWARE SPECIFICATION
Operating System
: Windows Family.
SOFTWARE DESCRIPTION:
JAVA
Java is an object-oriented multithread programming languages .It is designed
to be small, simple and portable across different platforms as well as operating
systems.
FEATURES OF JAVA
Platform Independence
Object Oriented
Compiler/Interpreter Combo
This provides portability to any machine for which a virtual machine has
been written.
The two steps of compilation and interpretation allow for extensive code
checking and improved security.
Robust
Exception handling built-in, strong type checking (that is, all data must be
declared an explicit type), local variables must be initialized.
No memory pointers
No preprocessor
Security
No memory pointers
Dynamic Binding
The linking of data and methods to where they are located is done at runtime.
Even if libraries are recompiled, there is no need to recompile code that uses
classes in those libraries.
This differs from C++, which uses static binding. This can result in fragile
classes for cases where linked code is changed and memory pointers then
point to the wrong addresses.
Good Performance
Threading
Built-in Networking
Java was designed with networking in mind and comes with many classes to
develop sophisticated Internet communications.
IMP applications are called IMlets, but in reality they are MIDlets. They subclass
MIDlet, and follow the same packaging, deployment, security and life-cycle as
MIDlets.
Connected Device Configuration
CDC is a smaller subset of Java SE, containing almost all the libraries that are not
GUI related.
Foundation Profile
A headless version of Java SE.
Personal Basis Profile
Extends the Foundation Profile to include lightweight GUI support in the form of
an AWT subset.
Personal Profile
This extension of Personal Basis Profile includes a more comprehensive AWT
subset and adds applet support.
Net Beans
editor, GUI editor, version control as well as support for distributed applications
(CORBA,
RMI,
etc.)
and
Web
applications
(JSPs,
servlets,
etc.).
be
tailor
made
for
the
program
in
question.
MySQL
MySQL is a relational database management system (RDBMS) that runs as a server providing
multi-user access to a number of databases. It is named after developer Michael Widenius'
daughter, My. The SQL phrase stands for Structured Query Language.
The MySQL development project has made its source code available under the terms of the GNU
General Public License, as well as under a variety of proprietary agreements. MySQL was
owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned
by Oracle Corporation.
Features
MySQL offered MySQL 5.1 in two different variants: the open source MySQL Community
Server and the commercial Enterprise Server. MySQL 5.5 is offered under the same licences.
They have a common code base and include the following features:
* X/Open XA distributed transaction processing (DTP) support; two phase commit as part of
this, using Oracle's InnoDB engine
* Independent storage engines (MyISAM for read speed, InnoDB for transactions and
referential integrity, MySQL Archive for storing historical data in little space)
* Transactions with the InnoDB, and Cluster storage engines; savepoints with InnoDB
* SSL support
* Query caching
* Sub-SELECTs (i.e. nested SELECTs)
* Replication support (i.e. Master-Master Replication & Master-Slave Replication) with one
master per slave, many slaves per master, no automatic support for multiple masters per slave.
* Full-text indexing and searching using MyISAM engine
* Embedded database library
* Partial Unicode support (UTF-8 and UCS-2 encoded strings are limited to the BMP)
* ACID compliance when using transaction capable storage engines (InnoDB and Cluster)[28]
* Partititoned tables with pruning of partitions in optimiser
* Shared-nothing clustering through MySQL Cluster
* Hot backup (via mysqlhotcopy) under certain conditions
SYSTEM ARCHITECTURE
Intra-cluster
query process
Cluster
1
Peer1
query
Intercluster
query
process
query
reply
Peer2
Cluster
1
Peer3
reply
reply
query
Peer4
MODULES
PAIS Construction and Maintenance
File Distribution
File Querying Algorithm
File replication
index of all files in its sub-cluster for file sharing among nodes in its sub-cluster. A
nodes requested file may not exist in its sub-cluster. To help nodes find files not
existing in their sub-clusters, as in traditional DHT networks, PAIS re-distributes
all files among nodes in the network for efficient global search.
File replication
A threshold is maintained for file access. If the file is access frequency is equal or
higher than the threshold, then the file is replicated with that peer. Replicated data
is stored in peer. If the same query is given by any other peer from the same
cluster, then the query is processed as inter cluster query.
Peer
Register
node
Level 1
Peer
Search
query
infodetai
ls
Query
process
Peer
Query
reply
searc
h
Level 2
Peer
Query
Check
freque
ncy
Data
replicati
on
peerna
me
UML DIAGRAM
USE CASE DIAGRAM
Current location
Issue Query
Query search
Query result
Data replication
SEQUENCE DIAGRAM
Peer
Peer
Proxy
Server
Submit
location
query
Query process
Reply user
Send to
server
Data
replication
COLLABORATION DIAGRAM
1: query
Peer
5:data
Replicatio
n
proxy
3:
process
Server
4:
reply
Peer
Cluster
search
ACTIVITY DIAGRAM
Peer
Query
Intercluster
Intracluster
Result
Peer
javax.swing.JButton;
javax.swing.JFrame;
javax.swing.JLabel;
javax.swing.JOptionPane;
javax.swing.JRadioButton;
javax.swing.JScrollPane;
javax.swing.JTable;
javax.swing.JTextField;
javax.swing.table.DefaultTableModel;
import
import
import
import
import
import
import
com.database.RetrieveQuery;
com.logic.Details;
com.logic.ProxyServer;
com.logic.SocketConnection;
com.serial.ClientInfo;
com.serial.ProxyInfo;
com.serial.SourceRes;
//add(bulkButton);
//add(progressButton);
add(jScrollPane);
setSize(600, 700);
setVisible(true);
}
public static void main(String[] args)
{
try {
UIManager.setLookAndFeel("com.easynth.lookandfeel.EaSynthLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
ProxyDesign proxyDesign=new ProxyDesign();
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==bulkButton)
{
progressButton.setSelected(false);
System.out.println(process);
}
if(e.getSource()==progressButton)
{
bulkButton.setSelected(false);
process=progressButton.getText();
System.out.println(process);
}
if(e.getSource()==processButton)
{
try
{
process=bulkButton.getText();
System.out.println(process);
System.out.println("*********");
System.out.println(categoryStr);
System.out.println(requestStr);
System.out.println(regionStr);
det=details.Config("port", "proxy");
String proxyPort=det[0];
String proxySys=det[1];
System.out.println("*********");
RetrieveQuery retrieveQuery=new RetrieveQuery();
String
output=retrieveQuery.CacheFetch(categoryStr,requestStr,regionStr,nodeIdStr);
System.out.println("full output..."+output);
if(output.equals(":"))
{
ProxyInfo proxyInfo=new ProxyInfo(requestStr,
categoryStr, regionStr,
nodeIdStr,process,sourePort,soureSys,proxyPort,proxySys,process);
ObjectOutputStream
objectOutputStream=socketConnection.SocketSend(lbsPort, lbsSys);
objectOutputStream.writeObject(proxyInfo);
}
else
{
objectOutputStream.close();
for(int
count=0;count<defaultTableModel.getRowCount();count++)
{
if(count==(defaultTableModel.getRowCount()-1))
{
System.out.println("aaaaaaaaaaaaaaa");
defaultTableModel.setValueAt("Responsed",count,
4);
}
Inter-Cluster Peer");
}
System.out.println("cache...."+output);
JOptionPane.showMessageDialog(null, "Response from
ObjectOutputStream
objectOutputStream=socketConnection.SocketSend(sourePort, soureSys);
SourceRes sourceRes=new
SourceRes(output,sourePort,soureSys);
objectOutputStream.writeObject(sourceRes);
}
}
catch (Exception ee) {
ee.printStackTrace();
}
}
}
}
ClientDesign.java
package com.Design;
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
java.awt.event.ActionEvent;
java.awt.event.ActionListener;
java.awt.event.WindowAdapter;
java.awt.event.WindowEvent;
java.io.ObjectOutputStream;
java.net.InetAddress;
java.util.Random;
javax.swing.*;
java.util.Vector;
java.util.*;
java.awt.image.BufferedImage;
java.io.File;
java.io.FileInputStream;
java.io.FileOutputStream;
java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import
import
import
import
import
import
import
import
import
import
javax.swing.JButton;
javax.swing.JFrame;
javax.swing.JLabel;
javax.swing.JOptionPane;
javax.swing.JProgressBar;
javax.swing.JScrollPane;
javax.swing.JTable;
javax.swing.JTextArea;
javax.swing.JTextField;
javax.swing.table.DefaultTableModel;
import
import
import
import
import
import
import
import
import
import
import
com.database.RetrieveQuery;
com.logic.ClientReceive;
com.logic.Details;
com.logic.RandomName;
com.logic.SocketConnection;
com.serial.ClientInfo;
com.serial.ClientInfo1;
com.serial.GreedyScheme;
com.serial.InsertNode;
com.serial.GetLiveNode;
com.serial.ExitNode;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
class WindowEventHandler extends WindowAdapter {
public void windowClosing(WindowEvent evt) {
RetrieveQuery retrieveQuery=new RetrieveQuery();
retrieveQuery.DeleteUnique(ClientDesign.nodeId, ClientDesign.region);
}
}
public class ClientDesign extends JFrame implements ActionListener
{
public static boolean status=true;
private JButton changeButton=new JButton("Dynamic Region");
private JButton addButton=new JButton("Add Records");
private JButton greedy=new JButton("Greedy Data Replication Scheme");
private JButton otoo=new JButton("OTOO");
private JButton rn=new JButton("Reliable Neighbor");
private JButton rg=new JButton("Reliable Grouping");
private JButton livenode=new JButton("Live Node");
private JButton exit=new JButton("Exit");
private JButton openButton = new JButton("Open");
private JTextField serTextField=new JTextField();
private JTextField catTextField=new JTextField();
private JButton jbutton=null;
public static String region=null;
public static String limit=null;
public
public
public
public
private
private
private
private
JLabel
JLabel
JLabel
JLabel
JTextField
JTextField
JTextField
JTextField
addser=new
addcat=new
adddet=new
addgro=new
JTextField();
JTextField();
JTextField();
JTextField();
boolean inplim=true;
boolean getnodeid=true;
boolean groupids=true;
String con="";
ClientDesign()
{
defaultTableModel.addColumn("Sub-Interest");
defaultTableModel.addColumn("Details");
defaultTableModel1.addColumn("Peer");
//defaultTableModel1.addColumn("Link Failure");
defaultTableModel1.addColumn("Cluster");
defaultTableModel2.addColumn("Interest");
defaultTableModel2.addColumn("Sub-Interest");
defaultTableModel2.addColumn("Details");
defaultTableModel2.addColumn("Cluster");
details=new Details();
det=details.Config("port", "proxy");
port=det[0];
proxySys=det[1];
socketConnection=new SocketConnection();
randomName=new RandomName();
portRandom=randomName.portNo();
ClientReceive clientReceive=new ClientReceive(portRandom);
while(getnodeid){
nodeId=JOptionPane.showInputDialog("Enter the NodeId");
if(!nodeId.equals(""))
{
getnodeid=false;
}
}
while(groupids){
groupId=JOptionPane.showInputDialog("Enter the Cluster");
if(!groupId.equals(""))
{
groupids=false;
}
}
String input = "some input string";
int hashCode = input.hashCode();
System.out.println("input hash code = " + hashCode);
try{
}catch(Exception ee)
{
ee.printStackTrace();
}
setTitle(nodeId);
setLayout(null);
add(addButton);
add(openButton);
//add(greedy);
//add(otoo);
//add(rn);
//add(rg);
add(livenode);
add(exit);
add(outputLabel);
add(regionLabel);
add(jScrollPane);
add(jScrollPane1);
add(jScrollPane2);
add(catTextField);
add(category);
add(service);
add(addcategory);
add(addservice);
//add(adddetails);
//add(addgroup);
add(serTextField);
add(addcat);
add(addser);
add(adddet);
//add(addgro);
add(fileup);
add(fileupload);
add(jbutton);
addWindowListener(new WindowEventHandler());
setSize(1020,720);
setVisible(true);
}
public static void main(String[] args)
{
try {
UIManager.setLookAndFeel("com.easynth.lookandfeel.EaSynthLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
ClientDesign clientDesign=new ClientDesign();
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==jbutton)
{
try
{
String request=serTextField.getText();
String category=catTextField.getText();
if(request.equals(""))
{
JOptionPane.showMessageDialog(null, "Enter the Service");
}
else if(category.equals(""))
{
JOptionPane.showMessageDialog(null, "Enter the Category");
}
if(!request.equals("")&&!category.equals(""))
{
fileupload.setText("You canceled.");
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
if(e.getSource()==addButton)
{
try
{
String request=addser.getText();
String category=addcat.getText();
String det=adddet.getText();
//String gro=addgro.getText();
if(request.equals(""))
{
JOptionPane.showMessageDialog(null, "Enter the Service");
}
if(category.equals(""))
{
JOptionPane.showMessageDialog(null, "Enter the Category");
}
if(det.equals(""))
{
JOptionPane.showMessageDialog(null, "Enter the Details");
}
if(!request.equals("")&&!category.equals("")&&!det.equals(""))
{
ClientInfo1 clientInfo1=new ClientInfo1(request,
category,con,groupId,nodeId,portRandom,InetAddress.getLocalHost().getHostName(
));
ObjectOutputStream
objectOutputStream=socketConnection.SocketSend(port, proxySys);
objectOutputStream.writeObject(clientInfo1);
objectOutputStream.close();
}
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
if(e.getSource()==livenode)
{
try
{
GetLiveNode GetLiveNode=new
GetLiveNode(nodeId,portRandom,InetAddress.getLocalHost().getHostName());
ObjectOutputStream
objectOutputStream=socketConnection.SocketSend(port, proxySys);
objectOutputStream.writeObject(GetLiveNode);
objectOutputStream.close();
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
if(e.getSource()==exit)
{
try
{
ExitNode ExitNode=new
ExitNode(nodeId,portRandom,InetAddress.getLocalHost().getHostName());
ObjectOutputStream
objectOutputStream=socketConnection.SocketSend(port, proxySys);
objectOutputStream.writeObject(ExitNode);
objectOutputStream.close();
System.exit(0);
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
}
public boolean IsDigit(String text) {
int index = 0;
boolean status = true;
char[] charText = text.toCharArray();
while (charText.length > index) {
if ((int) charText[index] < 48 || (int) charText[index] > 57) {
status = false;
break;
}
index++;
}
return status;
}
public static String getMD5Hex(final String inputString) throws
NoSuchAlgorithmException {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(inputString.getBytes());
byte[] digest = md.digest();
}
return convertByteToHex(digest);
return sb.toString();
SYSTEM TESTING
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid
outputs. All decision branches and internal code flow should be validated. It is the
testing of individual software units of the application .it is done after the
completion of an individual unit before integration. This is a structural testing, that
relies on knowledge of its construction and is invasive. Unit tests perform basic
tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process
performs accurately to the documented specifications and contains clearly defined
inputs and expected results.
Integration testing
Functional test
Invalid Input
Functions
Output
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
box .you cannot see into it. The test provides inputs and responds to outputs
without considering how the software works.
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
CONCLUSIONS
To enhance file location efficiency in P2P systems, interest-clustered super-peer
networks and proximity- clustered super-peer networks have been proposed. A
proximity-aware and interest-clustered P2P file sharing system is proposed based
on a structured P2P. It groups peers based on both interest and proximity by taking
advantage of a hierarchical structure of a structured P2P. PAIS uses an intelligent
file replication algorithm that replicates a file frequently requested by physically
close nodes near their physical location to enhance the file lookup efficiency.
Finally, PAIS enhances the file searching efficiency among the proximity-close and
common interest nodes through a number of approaches. It dramatically reduces
the overhead and yields significant improvements in file location efficiency even in
node dynamism. Also, the experimental results show the effectiveness of the
approaches for improving file searching efficiency among the proximity close and
common-interest nodes.
REFERENCES
[1] BitTorrent. (2013) [Online]. Available: http://www.bittorrent.com/
[2] Gnutella home page. (2003) [Online]. Available: http://www.gnutella.com
[3] I. Clarke, O. Sandberg, B. Wiley, and T. W. Hong, Freenet: A distributed anonymous
information storage and retrieval system, in Proc. Int. Workshop Des. Issues Anonymity
Unobservability, 2001, pp. 4666.
[4] I. Stoica, R. Morris, D. Liben-Nowell, D. R. Karger, M. F. Kaashoek, F. Dabek, and H.
Balakrishnan, Chord: A scalable peer-topeer lookup protocol for internet applications,
IEEE/ACM Trans. Netw., vol. 11, no. 1, pp. 1732, Feb. 2003.
[5] A. Rowstron and P. Druschel, Pastry: Scalable, decentralizedobject location and routing for
large-scale peer-to-peer systems, in Proc. IFIP/ACM Int. Conf. Distrib. Syst. Platforms
Heidelberg, 2001, pp. 329350.
[6] B. Y. Zhao, L. Huang, J. Stribling, S. C. Rhea, A. D. Joseph, and J. Kubiatowicz, Tapestry: A
resilient global-scale overlay for service deployment, IEEE J. Sel. Areas Commun., vol. 22, no.
1, pp. 4153, 2004.
[7] H. Shen, C. Xu, and G. Chen, Cycloid: A scalable constant-degree P2P overlay network,
Perform. Eval., vol. 63, pp. 195216, 2006.
[8] Z. Li, G. Xie, and Z. Li, Efficient and scalable consistency maintenance for heterogeneous
peer-to-peer systems, IEEE Trans. ParallelDistrib. Syst., vol. 19, no. 12, pp. 16951708, Dec.
2008.
[9] H. Shen and C.-Z. Xu, Hash-based proximity clustering for efficient load balancing in
heterogeneous DHT networks, J. Parallel Distrib. Comput., vol. 68, pp. 686702, 2008.
[10] FastTrack. (2003) [Online]. Available: http://www.fasttrack.nu/index_int.html