Commit Graph

51 Commits

Author SHA1 Message Date
Joshua Kissoon
b90a87b149 Statistician
- Added measuring the route Length (Hop Length) of content lookup operation
2014-05-07 09:26:29 +05:30
Joshua Kissoon
baeb656050 Cleaned up the code a bit
- Removed some unnecessary exception throwing
2014-05-06 12:59:43 +05:30
Joshua Kissoon
d920f2621e Added synchronization to prevent concurrency exceptions 2014-05-05 14:54:49 +05:30
Joshua Kissoon
0c4a40d9ca Removed some unnecessary print statements 2014-05-05 14:05:00 +05:30
Joshua Kissoon
37337afc66 There was an error when we recursively called the synchronized KadBucket.insert method
- Fixed it by removing the recursion
2014-05-05 12:46:44 +05:30
Joshua Kissoon
9c05736ef8 Updated content lookup operation and node lookup operation
- Use all nodes to these operations initially instead of the K-Closest because there may be the case that the K-Closest are offline
- The operation takes care of looking at the K-Closest.
2014-05-01 11:41:12 +05:30
Joshua Kissoon
b1bfba6d93 Kademlia Contact Removal
- Contact removal now working well, we only do removal when we need to get in touch with the contact for some reason.
- Replacement cache is now setup
2014-04-28 20:38:47 +05:30
Joshua Kissoon
fa47aceda9 Kad Server
- Added a specific exception to throw when the server is down

Kademlia Node
- Setup Shutdown proerly
- Updated a few things
2014-04-28 16:46:32 +05:30
Joshua Kissoon
54ac3fe740 Some major major changes to the entire Kademlia System.
Kademlia Node
- The Kademlia class is renamed to KademliaNode - this will now serve as the main node on the network
- The RoutingTable will be a part of this node
Node
- The node class is now a basic class containing information about a node to be used by peers on the network

RoutingTable
- Working on Evicting contacts from the routing table
- Working on Replacement Cache
- Written another simulation to test these new RoutingTable features
2014-04-28 15:25:07 +05:30
Joshua Kissoon
a2f48d2241 Content Refresh Operation improvement
- Added the improvement for content refresh operation from the paper, we keep the last time a content was republished, and on content update operations, we only republish if the last republish was before (current time - republishing time interval)
2014-04-26 23:19:13 +05:30
Joshua Kissoon
67c12438d1 Few minor updates and removal of completed @todos 2014-04-26 22:21:51 +05:30
Joshua Kissoon
41fb630515 Content Lookup Operation Update
Before the content lookup operation used to lookup a specified set of nodes then return the latest content; a short review of the paper showed that we only lookup until we find the Value then exit as soon as we do. Made the updates to the code.
2014-04-26 22:09:45 +05:30
Joshua Kissoon
6253ad0ca6 Removed a few completed @todo comments 2014-04-25 16:21:23 +05:30
Joshua Kissoon
7c24ed7cff Finished a few of the Todos
- Populate all of the K-Buckets on bootstrap
2014-04-25 16:17:09 +05:30
Joshua Kissoon
bf3280f62e Few renames and minor changes 2014-04-25 15:23:34 +05:30
Joshua Kissoon
6978a8023b Moved the receiver interface to the message/receiver package 2014-04-19 20:11:10 +05:30
Joshua Kissoon
6503c79681 ContentLookupOperation
Had a bug in the content lookup operation, if the total amount of content needed was not found, a Routing exception was thrown instead of returning what was found. Fixed the issue!
2014-04-19 15:09:07 +05:30
Joshua Kissoon
8e6052de23 ContentLookupOperation
CLO was timing out even if it had found the specified amount of content needed. Fixed that by exiting after the specified # of content required has been found
2014-04-13 19:15:24 +05:30
Joshua Kissoon
c31e0002e2 Change the wait time on operations to 50ms 2014-04-13 18:58:40 +05:30
Joshua Kissoon
4888bf4dd4 Improve response check time
When doing a NodeLookup, Content Lookup or Connect operation, after sending the message, we used to wait(operation_timeout) time before checking for a result. 
Now what I'm doing is waiting for 100 ms and check for a result every 100ms; I keep a count of total time waited, and only when the total time > operation_timeout do we make a timeout.
So now we can handle the response if it comes in before Operation_timeout time is finished
2014-04-13 18:57:54 +05:30
Joshua Kissoon
2dde2a75e0 Setup Content Updating
- Didn't do this before, but now it's setup: content will be updated on the DHT if a StoreContentMessage is sent with a newer version of the content

GetParameter
- Updated the GetParameter so that it can be constructed from a KadContent object or a StorageEntryMetadata object
- Move it to the DHT package

Others
- Added a few methods to StorageEntryMetadata, StorageEntryManager& DHT to simplify conversions between KadContent, GetParameter & StorageEntryMetadata

Tests
- Written a test to check content updating
2014-04-05 21:07:57 +05:30
Joshua Kissoon
3e236f4d17 Now we use a StorageEntry class to send data accross peers
Out KadContent interface also now specifies a set of methods to force it's subclasses to do their own toByte conversions
2014-04-02 18:05:14 +05:30
Joshua Kissoon
9190b122c7 The current mechanism for serializing content will not work for complex content types.
Now we need to add methods to KadContent objects to provide the byte[] format of their content and to re-read the byte format of their content.
2014-04-02 16:35:08 +05:30
Joshua Kissoon
b1ab1be760 Content Lookup wasn't working! Fixed the issue! stupid "!" in the damn statement! 2014-03-31 21:28:45 +05:30
Joshua Kissoon
a259579f4a Created a KadConfiguration interface that allows passing in a configuration file as needed.
This allows other applications to create their own configuration files
2014-03-29 14:37:01 +05:30
Joshua Kissoon
219e6073ed Content deletion from a node that is no longer one of the K-Closest is working! 2014-03-22 15:52:37 +05:30
Joshua Kissoon
b93133337c Added a method to store content only locally
Updated the StoreOperation to store content locally if the local Node is a part of the K-Closest to the content
2014-03-22 14:33:31 +05:30
Joshua Kissoon
3f82c4a0ef Did some code cleanups
- Add Comments
	- Remove println statements
	- Deleted useless comments, etc
2014-03-22 12:35:00 +05:30
Joshua Kissoon
21053a16ff Fixed the Distance Comparison bugs by using a new KeyComparator class of type Comparable<NodeId> and using BigIntegers to represent the keys and letting BigInteger do the comparisons 2014-03-22 11:32:41 +05:30
Joshua Kissoon
0cc24d42f3 Trying to fix an issue in the nodelookupoperation where the k-Closest nodes system doesn't work.
Lots of extra code added, but we're still in devel! so ...
2014-03-22 10:53:05 +05:30
Joshua Kissoon
630f8c2f28 2014-03-07 11:18:04 +05:30
Joshua Kissoon
46147eddd1 Finished a Basic version of the content refresh operation 2014-03-07 11:14:45 +05:30
Joshua Kissoon
a97905e431 Started working on the ContentRefreshOperation
- Setup a method to get all storage entries for the different content
	- Started setting up the content refresh operation functionality
2014-03-06 20:42:30 +05:30
Joshua Kissoon
689a35b7bf Cleaned up the core code, added comments and removed all Netbeans generated warnings 2014-03-06 16:51:42 +05:30
Joshua Kissoon
796e41dd9a Updated the bucket refresh operation to use 1 thread to update each bucket 2014-03-06 16:38:46 +05:30
Joshua Kissoon
cabb5af742 Finish Bucket Refresh Operation :) 2014-03-06 16:24:50 +05:30
Joshua Kissoon
f91dea9e5f NodeId.getFirstSetBitIndex was actually returning a distance value, but without a comparison, was confusing things.
Created a distance function to replace that.

Still working on Refresh Operations
2014-03-06 12:49:15 +05:30
Joshua Kissoon
acd7885dba Started working on the RefreshOperations 2014-03-06 11:21:08 +05:30
Joshua Kissoon
e4726b93f8 Content Store, Retrieve and DHT File and Table management working well
Got a few Todos now to finish off
2014-02-26 21:35:37 +05:30
Joshua Kissoon
58f9157c9d Finished coding the lookup content functionality 2014-02-26 18:58:55 +05:30
Joshua Kissoon
a2d0be6124 Finished DHT content storage and retrieval
Started working on Content lookup and sending content
2014-02-26 17:07:18 +05:30
Joshua Kissoon
b5e89c6ddb Keeping with some good coding standards - Code to Interfaces not implementations
Changed the use of ArrayList to List and HashMap to Map
2014-02-26 11:57:59 +05:30
Joshua Kissoon
c67e501df6 Content Sending working between nodes 2014-02-25 22:57:46 +05:30
Joshua Kissoon
995da2cffb Continuing work on message sending 2014-02-25 13:42:08 +05:30
Joshua Kissoon
faef3d03ec Started working on sending content messages 2014-02-25 13:01:06 +05:30
Joshua Kissoon
44077d344d Started working on Node refreshing the K-Buckets and DHT content at every time interval t
Started working on PUT, GET, STORE operation and on DHT Storage
2014-02-24 21:26:49 +05:30
Joshua Kissoon
3344511603 Finished NodeLookupOperation functionality! Finally found the bug 2014-02-22 19:37:04 +05:30
Joshua Kissoon
1de348fc72 Working on NodeLookups 2014-02-19 15:54:15 +05:30
Joshua Kissoon
58df7be300 Started working on the NodeLookupOperation
Created some new Messages
Updated a few minor things
2014-02-19 13:00:29 +05:30
Joshua Kissoon
ed1ac876f3 Fixed the bug in NodeConnection operation where the messages were still being re-sent even after an acknowledgement was received.
Fixed by canceling the TimerTask
2014-02-19 10:30:42 +05:30