Joshua Kissoon
0bcbab0f03
Fixed a bug in the getParameter where the owner variable was never being set if a certain constructor is called
2014-06-03 11:23:06 +05:30
Joshua Kissoon
8501740bc5
Switched back to using the StorageEntry class and StorageEntry Metadata class because of some issues with JSon serialization with polymorphism...
2014-06-03 10:43:53 +05:30
Joshua Kissoon
7a4cc2e91c
A few small changes
2014-06-02 15:22:19 +05:30
Joshua Kissoon
4a9fd713fd
Added a KademliaStorageEntryMetadada Interface
...
- Updated the rest of the system to use this interface
2014-06-02 14:44:51 +05:30
Joshua Kissoon
e8105a9e33
Updated the operations to use the KademliaNode interface rather than the JKademliaNode class
2014-06-02 14:31:15 +05:30
Joshua Kissoon
a1faffb4d9
Created a new storage entry interface,
...
Let the storage entry class and the rest of this system use this interface
2014-05-23 22:28:21 +05:30
Joshua Kissoon
9fb139571a
Added a KademliaDHT Interface and setup the DHT class and the rest of the system to use this interface
2014-05-23 22:14:08 +05:30
Joshua Kissoon
568f2fe9a8
The entire system is changed over to use the KademliaRoutingTable class instead of the JKademliaRoutingTable implementation
2014-05-23 20:56:03 +05:30
Joshua Kissoon
d6ab1493b8
Renamed the KadBucket to KademliaBucket
...
Renamed KadBucketImpl to JKademliaBucket because it's an implementation of KademliaBucket
2014-05-23 20:52:24 +05:30
Joshua Kissoon
41df450f4a
Renamed the KadRoutingTable to KademliaRoutingTable
...
Renamed RoutingTable to JKademliaRoutingTable because it's an implementation of KademliaRoutingTable
2014-05-23 20:51:28 +05:30
Joshua Kissoon
66616a7afd
Updated the JKademliaNode class to inherit the KademliaNode interface
2014-05-23 20:48:23 +05:30
Joshua Kissoon
a24eef8091
Added a KademliaNode interface
2014-05-23 20:45:17 +05:30
Joshua Kissoon
451cba4be9
From now on we'll name the interfaces properly and name the implementation with a J as prefix since this is the J Kademlia implementation
...
Renamed the KademliaNode class to JKademliaNode
2014-05-23 20:38:33 +05:30
Joshua Kissoon
ce5c49d46d
Changed the server to use Kademlia Message Factory interface rather than the specific class
2014-05-23 20:31:46 +05:30
Joshua Kissoon
fd0620aaf1
- Moved the items from kademlia.core package to kademlia package since both packages are core package.
...
- Deleted the kademlia.core package
2014-05-23 20:30:56 +05:30
Joshua Kissoon
720b062646
Added a message factory interface
2014-05-23 20:29:43 +05:30
Joshua Kissoon
b594b91adf
Renamed the test package to simulations
...
Created a simulations interface
2014-05-19 12:58:44 +05:30
Joshua Kissoon
a9e5402697
Updated the routing table bucket class to copy the contacts to another data structure before sending them, preventing other parts of the system from modifying the core data structure
2014-05-18 15:17:36 +05:30
Joshua Kissoon
807a9965d0
Added a method to check if the server is running
...
NodeLookupReceiver
Only use the server if it's running
2014-05-13 11:22:56 +05:30
Joshua Kissoon
9e94a225fe
Few minor changes
2014-05-13 11:17:26 +05:30
Joshua Kissoon
c23edf2cb9
Statistician
...
- Added some handling for 0 based values
2014-05-13 09:54:52 +05:30
Joshua Kissoon
a25b88a9bb
Added a method to get the number of failed content lookups
2014-05-12 23:46:02 +05:30
Joshua Kissoon
42da6df375
In the content lookup statistics - added a value "isContentFound" to be passed
2014-05-12 23:41:45 +05:30
Joshua Kissoon
fca4a5fde5
Again set our storageentry to store a string
...
- we'll have to encode any byte array to base64 if we need to
2014-05-12 17:34:41 +05:30
Joshua Kissoon
cc0cdc42b5
Manage content in byte format since strings may have encoding problems! especially for compression, etc
2014-05-12 15:15:59 +05:30
Joshua Kissoon
66321280e6
Set the Serializable objects to implement the Serializable interface
2014-05-12 13:12:24 +05:30
Joshua Kissoon
0ee1001049
Merge origin/master
2014-05-11 23:55:08 +05:30
Joshua Kissoon
5c067e723a
commit
2014-05-11 23:54:20 +05:30
Joshua Kissoon
b7c75c4e38
Changed StorageEntry to store content in String format since it's smaller
2014-05-11 18:59:35 +05:30
Joshua Kissoon
b49e8170f5
Updated content sending test
2014-05-11 16:02:36 +05:30
Joshua Kissoon
24abfe3d2a
Storage Entry Usage
...
- Now we manage storage entries directly from the KadNode
- rather than creating them all over the place
2014-05-11 15:39:43 +05:30
Joshua Kissoon
7b95d03d96
Moved the HashCalculator to the utils package rather than have it in a package of it's own
...
Keep the StorageEntry content in the byte[] format it was originally in rather than constantly changing it to a string
2014-05-11 15:15:26 +05:30
Joshua Kissoon
428cab774b
Node
...
- Update the node's getInetAddress method to return InetSocketAddress instead of SocketAddress since we get more methods available with this
-- Specifically we get a comparison method which is needed
2014-05-11 12:36:10 +05:30
Joshua Kissoon
06f9eeae43
Updated the operation timeout to be the same as the response timeout!
2014-05-11 10:40:46 +05:30
Joshua Kissoon
210e3842ca
ContentLookupOperation
...
- Forgot to initialize the route length checker
DHT
- Setup the subfolder for content to be 2 digits in length instead of 10
-- With 10, we only have 1 content in a folder, 2 will be better since > 1 content will be in a folder
-- Content with similar key tend to be in the same user, so they'll be alot in the same folder
2014-05-10 23:34:17 +05:30
Joshua Kissoon
d242e0a13a
Route Length Computation
...
- Before we were doing this by just adding incrementing a value everytime we get a set of nodes as the reply of a FIND_NODE or FIND_VALUE RPC
-- This may be wrong since nodes the same distance away may reply and we'll still be incrementing for both
- Created a route length checker class to properly check route lengths
ContentLookupOperation
- Added the route length check to the CLO operation
Didn't add it to the NodeLookupOperation since I'm not sure we're using it anywhere... Though it can be useful there
2014-05-10 21:17:44 +05:30
Joshua Kissoon
799a4887dd
Node Lookup OP
...
- Removed the unused error boolean
2014-05-10 21:15:24 +05:30
Joshua Kissoon
4fbc29fa24
NodeLookupOperation
...
- Removed the unused error variable
2014-05-10 21:06:46 +05:30
Joshua Kissoon
ed0a833e1a
KadBucket Bug
...
- We were checking if the contact stale count was ">" stale value rather than ">=" stale value
2014-05-10 20:36:39 +05:30
Joshua Kissoon
673979c29a
Routing Table
...
- We were not resetting the stale count of a contact when we saw it again, did that now
2014-05-10 19:52:21 +05:30
Joshua Kissoon
111cdc9e05
KadBucket
...
- Updated toString to display stale count of a contact
DHT
- Updated toString to print a count of content.
2014-05-10 19:28:19 +05:30
Joshua Kissoon
58696d627a
Made a few KadBucket methods private
...
Changed the comparison of KademliaId to use the hashcode
2014-05-09 16:05:14 +05:30
Joshua Kissoon
e8f0e20a8f
Seems we over-synchronized the DHT
...
- Removed the blocking synchronizations
2014-05-09 14:11:58 +05:30
Joshua Kissoon
f5409c70e9
Removed the excess method syncs
2014-05-09 13:22:40 +05:30
Joshua Kissoon
565bf50ddb
Added some synchronization to the KadBucket and DHT
2014-05-09 11:54:21 +05:30
Joshua Kissoon
3ab6b3d2ab
Renamed NodeId to KademliaId Since that's basically what it is!
2014-05-09 11:03:00 +05:30
Joshua Kissoon
ac950720f3
Contact
...
- Added equals() and hashCode() methods
KadBucketImpl
- Used a TreeSet instead of the TreeMap
2014-05-09 10:00:56 +05:30
Joshua Kissoon
f66d5f662f
Routing Table Find Closest
...
- Added a shorter method
- Create a treeset to sort the nodes
- Add all nodes in the routing table to the treeset
- Then select the top Q nodes required from the treeset
2014-05-09 09:27:35 +05:30
Joshua Kissoon
89d5c48d28
Bucket Refresh Operation
...
- Just found a major Bug!!! We were doing 160 refreshes looking for nodes with the local nodeId as the lookup ID for all 160 refreshes
- Updated to check for nodes at different distances from the local NodeId
Content Lookup Operation
- We were still using KademliaNode instead of KademliaNode.getNode to use the mini node for comparisons
2014-05-08 22:28:22 +05:30
Joshua Kissoon
98fc727cbe
Stop shutting down the server when we catch an exception
...
Catch a content not found exception in ContentLookupReceiver
2014-05-08 18:41:07 +05:30