- Moved the items from kademlia.core package to kademlia package since both packages are core package.

- Deleted the kademlia.core package
This commit is contained in:
Joshua Kissoon 2014-05-23 20:30:56 +05:30
parent 720b062646
commit fd0620aaf1
26 changed files with 46 additions and 40 deletions

View File

@ -1,4 +1,4 @@
package kademlia.core;
package kademlia;
import java.io.File;

View File

@ -1,4 +1,4 @@
package kademlia.core;
package kademlia;
/**
* Interface that defines a KadConfiguration object

View File

@ -1,4 +1,4 @@
package kademlia.core;
package kademlia;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

View File

@ -11,10 +11,7 @@ import java.net.InetAddress;
import java.util.NoSuchElementException;
import java.util.Timer;
import java.util.TimerTask;
import kademlia.core.DefaultConfiguration;
import kademlia.dht.GetParameter;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.dht.DHT;
import kademlia.dht.KadContent;
import kademlia.dht.StorageEntry;

View File

@ -2,4 +2,13 @@
1. Implement the "Optimized Contact Accounting" features as mentioned in the paper
2. Implement the "Accelerated Lookups" featured as described in the paper
3. Add a setup file on how to setup Kademlia and run it.
3. Add a setup file on how to setup Kademlia and run it.
Next Steps:
- Write Unit Tests
- Improve multi-threading system
-- I think server is slow in handling requests because the listen method runs in a single thread.
--- Listen() method should create a new thread to handle every incoming request.
- KadStatistician
-- Let the statistician keep track of failed get requests!

View File

@ -9,7 +9,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import java.util.NoSuchElementException;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.exceptions.ContentExistException;
import kademlia.exceptions.ContentNotFoundException;
import kademlia.node.KademliaId;

View File

@ -2,7 +2,7 @@ package kademlia.message;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadServer;
import kademlia.KadServer;
/**
* Receives a ConnectMessage and sends an AcknowledgeMessage as reply.

View File

@ -3,8 +3,8 @@ package kademlia.message;
import java.io.IOException;
import java.util.NoSuchElementException;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.DHT;
/**

View File

@ -2,7 +2,7 @@ package kademlia.message;
import java.io.DataInputStream;
import java.io.IOException;
import kademlia.core.KadServer;
import kademlia.KadServer;
/**
* A factory that handles creating messages and receivers

View File

@ -3,8 +3,8 @@ package kademlia.message;
import java.io.DataInputStream;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.DHT;
/**

View File

@ -3,8 +3,8 @@ package kademlia.message;
import java.io.IOException;
import java.util.List;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.node.Node;
/**

View File

@ -2,7 +2,7 @@ package kademlia.message;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadServer;
import kademlia.KadServer;
import kademlia.dht.DHT;
/**

View File

@ -2,8 +2,8 @@ package kademlia.operation;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.node.KademliaId;
/**

View File

@ -8,8 +8,8 @@ package kademlia.operation;
import kademlia.message.Receiver;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.exceptions.RoutingException;
import kademlia.message.AcknowledgeMessage;
import kademlia.message.ConnectMessage;

View File

@ -12,8 +12,8 @@ import java.util.SortedMap;
import java.util.TreeMap;
import kademlia.KademliaNode;
import kademlia.dht.GetParameter;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.StorageEntry;
import kademlia.exceptions.ContentNotFoundException;
import kademlia.exceptions.RoutingException;

View File

@ -3,8 +3,8 @@ package kademlia.operation;
import java.io.IOException;
import java.util.List;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.DHT;
import kademlia.dht.StorageEntryMetadata;
import kademlia.exceptions.ContentNotFoundException;

View File

@ -2,8 +2,8 @@ package kademlia.operation;
import java.io.IOException;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.DHT;
/**

View File

@ -9,8 +9,8 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.exceptions.RoutingException;
import kademlia.message.Message;
import kademlia.message.NodeLookupMessage;

View File

@ -8,7 +8,7 @@
package kademlia.operation;
import java.io.IOException;
import kademlia.core.KadServer;
import kademlia.KadServer;
import kademlia.exceptions.RoutingException;
import kademlia.node.Node;

View File

@ -3,8 +3,8 @@ package kademlia.operation;
import java.io.IOException;
import java.util.List;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.core.KadServer;
import kademlia.KadConfiguration;
import kademlia.KadServer;
import kademlia.dht.DHT;
import kademlia.dht.KadContent;
import kademlia.dht.StorageEntry;

View File

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.TreeSet;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.node.Node;
/**

View File

@ -1,7 +1,7 @@
package kademlia.routing;
import java.util.List;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.node.Node;
import kademlia.node.KademliaId;

View File

@ -3,7 +3,7 @@ package kademlia.routing;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.node.KeyComparator;
import kademlia.node.Node;
import kademlia.node.KademliaId;

View File

@ -2,9 +2,9 @@ package kademlia.simulations;
import java.util.Timer;
import java.util.TimerTask;
import kademlia.core.DefaultConfiguration;
import kademlia.DefaultConfiguration;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.node.KademliaId;
/**

View File

@ -2,9 +2,9 @@ package kademlia.simulations;
import java.util.Timer;
import java.util.TimerTask;
import kademlia.core.DefaultConfiguration;
import kademlia.DefaultConfiguration;
import kademlia.KademliaNode;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.node.KademliaId;
/**

View File

@ -12,7 +12,7 @@ import java.io.OutputStreamWriter;
import kademlia.routing.RoutingTable;
import java.lang.reflect.Type;
import java.util.List;
import kademlia.core.KadConfiguration;
import kademlia.KadConfiguration;
import kademlia.routing.Contact;
/**