Commit Graph

12 Commits

Author SHA1 Message Date
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
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
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
51de9cbc82 Re-Arranged a few packages a bit
Added a HashCalculator class
2014-04-05 22:36:46 +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
5b3e01df4e Fixed the bug "Getting content from reloaded node(Node whose state have been saved and re-loaded from file) NullPointerException".
Wrote a test to show getting content from reloaded node
2014-04-01 10:42:43 +05:30
Joshua Kissoon
1995682992 Had some issues with saving node state since saving configuration had a problem. We do not need to save configuration! Fixed the bug by making the configuration transient 2014-03-31 22:50:57 +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