From d1328353a40576f446ca064d2e36c435a60ffba0 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Tue, 3 Apr 2018 22:50:39 -0400 Subject: [PATCH 01/11] initial commit --- PROJ1/get.go | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 PROJ1/get.go diff --git a/PROJ1/get.go b/PROJ1/get.go new file mode 100644 index 0000000..e69de29 From 0a16f777521182b98b667528c9fa3e85292f52a5 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Thu, 12 Apr 2018 21:10:23 -0400 Subject: [PATCH 02/11] setting things up --- PROJ1/.gitignore | 5 +++++ PROJ1/get.go | 0 PROJ1/get/get.go | 10 ++++++++++ 3 files changed, 15 insertions(+) create mode 100644 PROJ1/.gitignore delete mode 100644 PROJ1/get.go create mode 100644 PROJ1/get/get.go diff --git a/PROJ1/.gitignore b/PROJ1/.gitignore new file mode 100644 index 0000000..a8a3899 --- /dev/null +++ b/PROJ1/.gitignore @@ -0,0 +1,5 @@ +*.old +*.OLD +*.bak +*.BAK +test.go diff --git a/PROJ1/get.go b/PROJ1/get.go deleted file mode 100644 index e69de29..0000000 diff --git a/PROJ1/get/get.go b/PROJ1/get/get.go new file mode 100644 index 0000000..3728a8a --- /dev/null +++ b/PROJ1/get/get.go @@ -0,0 +1,10 @@ +import "fmt" + + + + + +func put() { + + +} From 44caad3c39e01f65b4f6d8a723027108588f6095 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Sun, 15 Apr 2018 22:10:48 -0400 Subject: [PATCH 03/11] updated .gitignore --- PROJ1/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/PROJ1/.gitignore b/PROJ1/.gitignore index a8a3899..1dbc364 100644 --- a/PROJ1/.gitignore +++ b/PROJ1/.gitignore @@ -1,3 +1,4 @@ +.gitignore *.old *.OLD *.bak From 93cf0ec8264face594c48131583ec854a48f4b94 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Sun, 15 Apr 2018 22:23:52 -0400 Subject: [PATCH 04/11] Just pushing some code based on Put --- PROJ1/get/get.go | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/PROJ1/get/get.go b/PROJ1/get/get.go index 3728a8a..4400cd3 100644 --- a/PROJ1/get/get.go +++ b/PROJ1/get/get.go @@ -1,10 +1,34 @@ import "fmt" +import msg "./utils/message_defs" +import node "./utils/node_defs" +func Get(key String, respond-to int64)(value string) { -func put() { + // Get Node Data + var node_id = map_to_string_id(key) + // Check to see if we have it + if ChannelID == node_id { + value := DataTable[key] + + } + + // Lookup key in own finger table + for k, v := range FingerTable { + if k == node_id { + value := DataTable[key] + return + } else { + + var closest_node = find_biggest_node(FingerTable, node_id) + value := closest_node.DataTable[key] + return + } + } + + return } From 8a6e593597f9fa61448dd0cff3e33e0b115b96be Mon Sep 17 00:00:00 2001 From: nallg00d Date: Sun, 15 Apr 2018 22:41:34 -0400 Subject: [PATCH 05/11] Fixed/cleaned up Get similar to Put --- PROJ1/get/get.go | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/PROJ1/get/get.go b/PROJ1/get/get.go index 4400cd3..681bdef 100644 --- a/PROJ1/get/get.go +++ b/PROJ1/get/get.go @@ -7,28 +7,32 @@ import node "./utils/node_defs" func Get(key String, respond-to int64)(value string) { + var found = false + var closest_node = nil // Get Node Data var node_id = map_to_string_id(key) // Check to see if we have it if ChannelID == node_id { - value := DataTable[key] - - } - - // Lookup key in own finger table - for k, v := range FingerTable { - if k == node_id { - value := DataTable[key] - return - } else { - - var closest_node = find_biggest_node(FingerTable, node_id) - value := closest_node.DataTable[key] - return + } else { + + // Check out Finger tables + for k, v := range FingerTable { + if k == node_id { + value = DataTable[node_id] + found = true + break + } } } + + // It's not in our finger table so we need to find the next highest node + // without over shooting + if found == false { + closest_node = FindClosestPreceedingNode(&FingerTable, data.Key) + value = closest_node.DataTable[data.Key] + } return } From ea802bbfe9aadd5b4c55ab9e51ad1cecb62833c4 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Sun, 15 Apr 2018 22:48:46 -0400 Subject: [PATCH 06/11] added package def --- PROJ1/get/get.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PROJ1/get/get.go b/PROJ1/get/get.go index 681bdef..2e308e6 100644 --- a/PROJ1/get/get.go +++ b/PROJ1/get/get.go @@ -1,3 +1,5 @@ +package get + import "fmt" import msg "./utils/message_defs" import node "./utils/node_defs" From ff7e749d973076245dbeae3379d375f3ac89d736 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Mon, 16 Apr 2018 22:14:18 -0400 Subject: [PATCH 07/11] Fixing up with FindClosestPreceedingNode --- PROJ1/get/get.go | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/PROJ1/get/get.go b/PROJ1/get/get.go index 2e308e6..308c38d 100644 --- a/PROJ1/get/get.go +++ b/PROJ1/get/get.go @@ -1,40 +1,16 @@ package get -import "fmt" import msg "./utils/message_defs" import node "./utils/node_defs" +func Get(data *msg.Data, respond-to int64, node_obj *node.Node)(value string) { - - -func Get(key String, respond-to int64)(value string) { - - var found = false - var closest_node = nil // Get Node Data var node_id = map_to_string_id(key) - - // Check to see if we have it - if ChannelID == node_id { - value := DataTable[key] - } else { - - // Check out Finger tables - for k, v := range FingerTable { - if k == node_id { - value = DataTable[node_id] - found = true - break - } - } - } // It's not in our finger table so we need to find the next highest node - // without over shooting - if found == false { - closest_node = FindClosestPreceedingNode(&FingerTable, data.Key) - value = closest_node.DataTable[data.Key] - } + var closest_node = FindClosestPreceedingNode(&node_obj.FingerTable, data.Key) + value = closest_node.DataTable[data.Key] return } From dc5116bcd2d4cdf6b50ad0dacaa7c57213c8e4c3 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Tue, 1 May 2018 00:07:19 -0400 Subject: [PATCH 08/11] UNTESTED but it looks like it should work based on similar code from PUT --- PROJ1/main.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/PROJ1/main.go b/PROJ1/main.go index 77906bd..e176ed3 100644 --- a/PROJ1/main.go +++ b/PROJ1/main.go @@ -477,7 +477,7 @@ func Stabilize(node_obj *node.Node){ Gets the data...The node_obj is the node that will start the lookup for the data The data that is obtained will be sent through the bucket */ -func GetData(node_obj *node.Node, respond_to int64, key string){ +func GetData(node_obj *node.Node, respond_to int64, key string)(value string){ log.Printf("\nGetting data with key %s by asking Node %d\n", key, node_obj.ChannelId) key_id := map_string_to_id(key) log.Printf("\nKey: %s mapped to hash of %d\n", key, key_id) @@ -485,11 +485,25 @@ func GetData(node_obj *node.Node, respond_to int64, key string){ bucket_data := GetDataFromBucket(node_obj.ChannelId) closest := ExtractIdFromBucketData(bucket_data) log.Printf("\nGET: Found %d as the closest to %d\n", closest, key_id) + if closest > key_id { //Then just say we are at the right node to store - log.Printf("\nStored Data\n") - + + log.Printf("\nGET: Retrieving value: %s at key: %d from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + return node_obj.DataTable[key] + + } else { + + if node_obj.ChannelId == node_obj.Successor { + log.Printf("\nGET: Retrieving value: %s at key: %d from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + return node_obj.DataTable[key] + + } else { + log.Printf("\nPUT: Sending key: %s to node: %d\n", key, node_obj.Successor) + SendDataToNetwork(node_obj.Successor, key) + } } + return } From ca1c85e580aef070df41b6ab34280c5c5256d36d Mon Sep 17 00:00:00 2001 From: nallg00d Date: Wed, 2 May 2018 21:03:26 -0400 Subject: [PATCH 09/11] added some GET test instructions --- PROJ1/test_instructions.txt | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/PROJ1/test_instructions.txt b/PROJ1/test_instructions.txt index 35081eb..fa17c83 100644 --- a/PROJ1/test_instructions.txt +++ b/PROJ1/test_instructions.txt @@ -1,16 +1,7 @@ -{"do":"join-ring", "sponsoring-node": 2, "test-send-to": 1} -{"do":"stabilize-ring", "test-send-to": 1} -{"do":"stabilize-ring", "test-send-to": 2} -{"do":"stabilize-ring", "test-send-to": 1} -{"do":"stabilize-ring", "test-send-to": 2} -{"do":"fix-ring-fingers", "test-send-to": 2} -{"do":"fix-ring-fingers", "test-send-to": 1} -{"do":"fix-ring-fingers", "test-send-to": 2} -{"do":"fix-ring-fingers", "test-send-to": 1} -{"do":"join-ring", "sponsoring-node": 1, "test-send-to": 3} -{"do":"stabilize-ring", "test-send-to": 3} -{"do":"stabilize-ring", "test-send-to": 2} -{"do":"fix-ring-fingers", "test-send-to": 2} -{"do":"fix-ring-fingers", "test-send-to": 3} -{"do":"leave-ring", "mode":"orderly", "test-send-to": 2} - +{"do":"join-ring", "sponsoring-node": 1, "test-send-to": 2} +{"do":"join-ring", "sponsoring-node": 2, "test-send-to": 3} +{"do":"join-ring", "sponsoring-node": 3, "test-send-to": 4} +{"do":"put","data":{"key":"fff","value":"DFDF"}, "test-send-to":1} +{"do":"put","data":{"key":"xxx","value":"XXXX"}, "test-send-to":2} +{"do":"put","data":{"key":"yyy","value":"YYYY"}, "test-send-to":3} +{"do":"get","data":{"key":"yyy"}, "test-send-to":3} From 7995db399de5d59e16b406793d6914199e11a4d1 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Wed, 2 May 2018 21:16:10 -0400 Subject: [PATCH 10/11] Small test of get seems to work --- PROJ1/main.go | 4 ++-- PROJ1/test_instructions.txt | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/PROJ1/main.go b/PROJ1/main.go index e176ed3..db7653b 100644 --- a/PROJ1/main.go +++ b/PROJ1/main.go @@ -489,13 +489,13 @@ func GetData(node_obj *node.Node, respond_to int64, key string)(value string){ if closest > key_id { //Then just say we are at the right node to store - log.Printf("\nGET: Retrieving value: %s at key: %d from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + log.Printf("\nGET: Retrieving value: %s at key: %s from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) return node_obj.DataTable[key] } else { if node_obj.ChannelId == node_obj.Successor { - log.Printf("\nGET: Retrieving value: %s at key: %d from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + log.Printf("\nGET: Retrieving value: %s at key: %w from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) return node_obj.DataTable[key] } else { diff --git a/PROJ1/test_instructions.txt b/PROJ1/test_instructions.txt index fa17c83..d10bb35 100644 --- a/PROJ1/test_instructions.txt +++ b/PROJ1/test_instructions.txt @@ -1,7 +1,5 @@ {"do":"join-ring", "sponsoring-node": 1, "test-send-to": 2} -{"do":"join-ring", "sponsoring-node": 2, "test-send-to": 3} -{"do":"join-ring", "sponsoring-node": 3, "test-send-to": 4} +{"do":"join-ring", "sponsoring-node": 1, "test-send-to": 3} {"do":"put","data":{"key":"fff","value":"DFDF"}, "test-send-to":1} -{"do":"put","data":{"key":"xxx","value":"XXXX"}, "test-send-to":2} -{"do":"put","data":{"key":"yyy","value":"YYYY"}, "test-send-to":3} -{"do":"get","data":{"key":"yyy"}, "test-send-to":3} +{"do":"put","data":{"key":"xxx","value":"YYYY"}, "test-send-to":2} +{"do":"get","data":{"key":"fff"}, "test-send-to":1} From 56251864b77155a16f724bd87673e08a01c30490 Mon Sep 17 00:00:00 2001 From: nallg00d Date: Thu, 3 May 2018 19:40:47 -0400 Subject: [PATCH 11/11] GET seems to work and retrieve data --- PROJ1/main.go | 46 +++-- PROJ1/test_instructions.txt | 1 + SAMPLES/get-test-2-nodes-output.txt | 289 ++++++++++++++++++++++++++++ 3 files changed, 317 insertions(+), 19 deletions(-) create mode 100644 SAMPLES/get-test-2-nodes-output.txt diff --git a/PROJ1/main.go b/PROJ1/main.go index 355c909..043492f 100644 --- a/PROJ1/main.go +++ b/PROJ1/main.go @@ -486,25 +486,33 @@ func GetData(node_obj *node.Node, respond_to int64, key string)(value string){ closest := ExtractIdFromBucketData(bucket_data) log.Printf("\nGET: Found %d as the closest to %d\n", closest, key_id) - if closest > key_id { - //Then just say we are at the right node to store - - log.Printf("\nGET: Retrieving value: %s at key: %s from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) - return node_obj.DataTable[key] - - } else { - - if node_obj.ChannelId == node_obj.Successor { - log.Printf("\nGET: Retrieving value: %s at key: %w from node: %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) - return node_obj.DataTable[key] - - } else { - log.Printf("\nPUT: Sending key: %s to node: %d\n", key, node_obj.Successor) - SendDataToNetwork(node_obj.Successor, key) - } - } - - return + if Between(closest, key_id, node_obj.Successor) || node_obj.ChannelId == node_obj.Successor { + + // Correct Node + log.Printf("\nGET: Retrieving value: %s at key: %s from node %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + return node_obj.DataTable[key] + + } else { + + // Could be the right node... + if node_obj.ChannelId == node_obj.Successor { + log.Printf("\nGET: Retrieving value: %s at key: %s from node %d\n", node_obj.DataTable[key], key, node_obj.ChannelId) + return node_obj.DataTable[key] + + } else { + + // Wrong node + log.Printf("\nGET: Sending key: %s to node: %d\n", key, node_obj.Successor) + var message = msg.Message {Do :"get", Data: msg.Data{Key: key}} + string_message, err := json.Marshal(message) + check_error(err) + SendDataToNetwork(node_obj.Successor, string(string_message)) + log.Printf("\nGET: Sending key: %s to node: %d\n", key, node_obj.Successor) + log.Printf("\nGET: Sent: %s \n", string(string_message)) + + } + } + return } /* diff --git a/PROJ1/test_instructions.txt b/PROJ1/test_instructions.txt index d10bb35..d66eee2 100644 --- a/PROJ1/test_instructions.txt +++ b/PROJ1/test_instructions.txt @@ -3,3 +3,4 @@ {"do":"put","data":{"key":"fff","value":"DFDF"}, "test-send-to":1} {"do":"put","data":{"key":"xxx","value":"YYYY"}, "test-send-to":2} {"do":"get","data":{"key":"fff"}, "test-send-to":1} +{"do":"get","data":{"key":"xxx"}, "test-send-to":2} \ No newline at end of file diff --git a/SAMPLES/get-test-2-nodes-output.txt b/SAMPLES/get-test-2-nodes-output.txt new file mode 100644 index 0000000..7cc550a --- /dev/null +++ b/SAMPLES/get-test-2-nodes-output.txt @@ -0,0 +1,289 @@ +2018/05/03 19:37:55 +Starting program with the following: +Instruction File: test_instructions.txt +Number of network nodes: 4 +Mean wait time: 5.000000 +2018/05/03 19:37:55 This is the coordinator. +2018/05/03 19:37:55 Node 2 was used to create the ring. +2018/05/03 19:37:55 +Adding Node 0 to network +2018/05/03 19:37:55 +Adding Node 1 to network +2018/05/03 19:37:55 +Adding Node 3 to network +2018/05/03 19:37:55 INIT_TOPOLOGY:Failed to generate any more network nodes +2018/05/03 19:37:55 +Waiting 2 seconds before processing message for Node: 2 +2018/05/03 19:37:56 +Node: 2 received the following message:{"do":"join-ring","sponsoring-node":1,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"","value":""},"test-send-to":2} +2018/05/03 19:37:56 +Node 2 is already in the ring; cannot join-ring +2018/05/03 19:37:56 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:37:56 +Node 2 is in the ring +2018/05/03 19:37:56 ++++Contents of Node 2+++ +2018/05/03 19:37:56 Channel Id/Node Id: 2 +2018/05/03 19:37:56 +FingerTable+: +2018/05/03 19:37:56 Finger Table at 0 is 2 +2018/05/03 19:37:56 Finger Table at 1 is 2 +2018/05/03 19:37:56 +DataTable+: +2018/05/03 19:37:56 Successor Id: 2 +2018/05/03 19:37:56 Predecessor Id: 2 +2018/05/03 19:37:56 ++++END of Contents of Node 2+++ +2018/05/03 19:37:56 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:37:56 +Waiting 5 seconds before processing message for Node: 3 +2018/05/03 19:38:06 +Node: 3 received the following message:{"do":"join-ring","sponsoring-node":1,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"","value":""},"test-send-to":3} +2018/05/03 19:38:06 +JOIN_RING:Node 3 is joining the ring now +2018/05/03 19:38:06 +BUCKET:Node: 1's data is waiting for data to be read .... +2018/05/03 19:38:06 +Waiting 5 seconds before processing message for Node: 1 +2018/05/03 19:38:06 +Node: 1 received the following message:{"do":"find-ring-successor","sponsoring-node":0,"mode":"","respond-to":1,"TargetId":3,"data":{"key":"","value":""},"test-send-to":0} +2018/05/03 19:38:06 +RespondTo node: 1 is not responding...not in ring? +2018/05/03 19:38:06 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:06 +Node 2 is in the ring +2018/05/03 19:38:06 ++++Contents of Node 2+++ +2018/05/03 19:38:06 Channel Id/Node Id: 2 +2018/05/03 19:38:06 +FingerTable+: +2018/05/03 19:38:06 Finger Table at 0 is 2 +2018/05/03 19:38:06 Finger Table at 1 is 2 +2018/05/03 19:38:06 +DataTable+: +2018/05/03 19:38:06 Successor Id: 2 +2018/05/03 19:38:06 Predecessor Id: 2 +2018/05/03 19:38:06 ++++END of Contents of Node 2+++ +2018/05/03 19:38:06 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:26 +WARNING:Timeout when listening for response data for Node 1 +2018/05/03 19:38:26 Failed to extract the following bucket data: +2018/05/03 19:38:26 +JOIN_RING:SENT find successor message with sponsoring node: 1 and target node: 3. Successor of target is -1 +2018/05/03 19:38:26 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:26 +Node 3 is in the ring +2018/05/03 19:38:26 ++++Contents of Node 3+++ +2018/05/03 19:38:26 Channel Id/Node Id: 3 +2018/05/03 19:38:26 +FingerTable+: +2018/05/03 19:38:26 +DataTable+: +2018/05/03 19:38:26 Successor Id: 3 +2018/05/03 19:38:26 Predecessor Id: nil +2018/05/03 19:38:26 ++++END of Contents of Node 3+++ +2018/05/03 19:38:26 +Node 2 is in the ring +2018/05/03 19:38:26 ++++Contents of Node 2+++ +2018/05/03 19:38:26 Channel Id/Node Id: 2 +2018/05/03 19:38:26 +FingerTable+: +2018/05/03 19:38:26 Finger Table at 0 is 2 +2018/05/03 19:38:26 Finger Table at 1 is 2 +2018/05/03 19:38:26 +DataTable+: +2018/05/03 19:38:26 Successor Id: 2 +2018/05/03 19:38:26 Predecessor Id: 2 +2018/05/03 19:38:26 ++++END of Contents of Node 2+++ +2018/05/03 19:38:26 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:26 +Waiting 0 seconds before processing message for Node: 1 +2018/05/03 19:38:27 +Node: 1 received the following message:{"do":"put","sponsoring-node":0,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"fff","value":"DFDF"},"test-send-to":1} +2018/05/03 19:38:27 +PUT: Putting data with key fff by asking Node 1 +2018/05/03 19:38:27 +Key: fff mapped to hash of 2 +2018/05/03 19:38:27 CLOSEST_PRECEEDING:Searching for closest preceeding node..... +2018/05/03 19:38:27 +BUCKET:Node: 1 was written bucket data +2018/05/03 19:38:27 +BUCKET:Node: 1's data is waiting for data to be read .... +2018/05/03 19:38:27 +BETWEEN: Checking if 1 is in between 2 and 1 +2018/05/03 19:38:27 BEETWEEN: 1 target and 2 first +2018/05/03 19:38:27 +PUT: Putting Key: fff with value: DFDF at Node: 1 +2018/05/03 19:38:27 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:27 +Node 2 is in the ring +2018/05/03 19:38:27 ++++Contents of Node 2+++ +2018/05/03 19:38:27 Channel Id/Node Id: 2 +2018/05/03 19:38:27 +FingerTable+: +2018/05/03 19:38:27 Finger Table at 0 is 2 +2018/05/03 19:38:27 Finger Table at 1 is 2 +2018/05/03 19:38:27 +DataTable+: +2018/05/03 19:38:27 Successor Id: 2 +2018/05/03 19:38:27 Predecessor Id: 2 +2018/05/03 19:38:27 ++++END of Contents of Node 2+++ +2018/05/03 19:38:27 +Node 3 is in the ring +2018/05/03 19:38:27 ++++Contents of Node 3+++ +2018/05/03 19:38:27 Channel Id/Node Id: 3 +2018/05/03 19:38:27 +FingerTable+: +2018/05/03 19:38:27 +DataTable+: +2018/05/03 19:38:27 Successor Id: 3 +2018/05/03 19:38:27 Predecessor Id: nil +2018/05/03 19:38:27 ++++END of Contents of Node 3+++ +2018/05/03 19:38:27 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:27 +Waiting 1 seconds before processing message for Node: 2 +2018/05/03 19:38:27 +Node: 2 received the following message:{"do":"put","sponsoring-node":0,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"xxx","value":"YYYY"},"test-send-to":2} +2018/05/03 19:38:27 +PUT: Putting data with key xxx by asking Node 2 +2018/05/03 19:38:27 +Key: xxx mapped to hash of 0 +2018/05/03 19:38:27 CLOSEST_PRECEEDING:Searching for closest preceeding node..... +2018/05/03 19:38:27 +BETWEEN: Checking if 2 is in between 2 and 0 +2018/05/03 19:38:27 BEETWEEN: 2 target and 2 first +2018/05/03 19:38:27 +BETWEEN: Checking if 2 is in between 2 and 0 +2018/05/03 19:38:27 BEETWEEN: 2 target and 2 first +2018/05/03 19:38:27 +BUCKET:Node: 2 was written bucket data +2018/05/03 19:38:27 +BUCKET:Node: 2's data is waiting for data to be read .... +2018/05/03 19:38:27 +BETWEEN: Checking if 2 is in between 0 and 2 +2018/05/03 19:38:27 +PUT: Putting Key: xxx with value: YYYY at Node: 2 +2018/05/03 19:38:27 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:27 +Node 2 is in the ring +2018/05/03 19:38:27 ++++Contents of Node 2+++ +2018/05/03 19:38:27 Channel Id/Node Id: 2 +2018/05/03 19:38:27 +FingerTable+: +2018/05/03 19:38:27 Finger Table at 0 is 2 +2018/05/03 19:38:27 Finger Table at 1 is 2 +2018/05/03 19:38:27 +DataTable+: +2018/05/03 19:38:27 +Waiting 1 seconds before processing message for Node: 1 +2018/05/03 19:38:27 Data Table at xxx is YYYY +2018/05/03 19:38:27 Successor Id: 2 +2018/05/03 19:38:27 Predecessor Id: 2 +2018/05/03 19:38:27 ++++END of Contents of Node 2+++ +2018/05/03 19:38:27 +Node 3 is in the ring +2018/05/03 19:38:27 ++++Contents of Node 3+++ +2018/05/03 19:38:27 Channel Id/Node Id: 3 +2018/05/03 19:38:27 +FingerTable+: +2018/05/03 19:38:27 +DataTable+: +2018/05/03 19:38:27 Successor Id: 3 +2018/05/03 19:38:27 Predecessor Id: nil +2018/05/03 19:38:27 ++++END of Contents of Node 3+++ +2018/05/03 19:38:27 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:31 +Node: 1 received the following message:{"do":"get","sponsoring-node":0,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"fff","value":""},"test-send-to":1} +2018/05/03 19:38:31 +Getting data with key fff by asking Node 1 +2018/05/03 19:38:31 +Key: fff mapped to hash of 2 +2018/05/03 19:38:31 CLOSEST_PRECEEDING:Searching for closest preceeding node..... +2018/05/03 19:38:31 +BUCKET:Node: 1 was written bucket data +2018/05/03 19:38:31 +BUCKET:Node: 1's data is waiting for data to be read .... +2018/05/03 19:38:31 +GET: Found 1 as the closest to 2 +2018/05/03 19:38:31 +BETWEEN: Checking if 1 is in between 2 and 1 +2018/05/03 19:38:31 BEETWEEN: 1 target and 2 first +2018/05/03 19:38:31 +GET: Retrieving value: DFDF at key: fff from node 1 +2018/05/03 19:38:31 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:31 +Node 2 is in the ring +2018/05/03 19:38:31 ++++Contents of Node 2+++ +2018/05/03 19:38:31 Channel Id/Node Id: 2 +2018/05/03 19:38:31 +Waiting 0 seconds before processing message for Node: 2 +2018/05/03 19:38:31 +FingerTable+: +2018/05/03 19:38:31 +Node: 2 received the following message:{"do":"get","sponsoring-node":0,"mode":"","respond-to":0,"TargetId":0,"data":{"key":"xxx","value":""},"test-send-to":2} +2018/05/03 19:38:31 Finger Table at 1 is 2 +2018/05/03 19:38:31 Finger Table at 0 is 2 +2018/05/03 19:38:31 +DataTable+: +2018/05/03 19:38:31 Data Table at xxx is YYYY +2018/05/03 19:38:31 Successor Id: 2 +2018/05/03 19:38:31 Predecessor Id: 2 +2018/05/03 19:38:31 ++++END of Contents of Node 2+++ +2018/05/03 19:38:31 +Getting data with key xxx by asking Node 2 +2018/05/03 19:38:31 +Key: xxx mapped to hash of 0 +2018/05/03 19:38:31 CLOSEST_PRECEEDING:Searching for closest preceeding node..... +2018/05/03 19:38:31 +BETWEEN: Checking if 2 is in between 2 and 0 +2018/05/03 19:38:31 BEETWEEN: 2 target and 2 first +2018/05/03 19:38:31 +BETWEEN: Checking if 2 is in between 2 and 0 +2018/05/03 19:38:31 BEETWEEN: 2 target and 2 first +2018/05/03 19:38:31 +BUCKET:Node: 2 was written bucket data +2018/05/03 19:38:31 +Node 3 is in the ring +2018/05/03 19:38:31 ++++Contents of Node 3+++ +2018/05/03 19:38:31 Channel Id/Node Id: 3 +2018/05/03 19:38:31 +FingerTable+: +2018/05/03 19:38:31 +DataTable+: +2018/05/03 19:38:31 Successor Id: 3 +2018/05/03 19:38:31 Predecessor Id: nil +2018/05/03 19:38:31 ++++END of Contents of Node 3+++ +2018/05/03 19:38:31 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:31 +BUCKET:Node: 2's data is waiting for data to be read .... +2018/05/03 19:38:31 +GET: Found 2 as the closest to 0 +2018/05/03 19:38:31 +BETWEEN: Checking if 2 is in between 0 and 2 +2018/05/03 19:38:31 +GET: Retrieving value: YYYY at key: xxx from node 2 +2018/05/03 19:38:31 +++LIST OF NODES CURRENTLY IN THE RING+++ +2018/05/03 19:38:31 +Node 2 is in the ring +2018/05/03 19:38:31 ++++Contents of Node 2+++ +2018/05/03 19:38:31 Channel Id/Node Id: 2 +2018/05/03 19:38:31 +FingerTable+: +2018/05/03 19:38:31 Finger Table at 0 is 2 +2018/05/03 19:38:31 Finger Table at 1 is 2 +2018/05/03 19:38:31 +DataTable+: +2018/05/03 19:38:31 Data Table at xxx is YYYY +2018/05/03 19:38:31 Successor Id: 2 +2018/05/03 19:38:31 Predecessor Id: 2 +2018/05/03 19:38:31 ++++END of Contents of Node 2+++ +2018/05/03 19:38:31 +Node 3 is in the ring +2018/05/03 19:38:31 ++++Contents of Node 3+++ +2018/05/03 19:38:31 Channel Id/Node Id: 3 +2018/05/03 19:38:31 +FingerTable+: +2018/05/03 19:38:31 +DataTable+: +2018/05/03 19:38:31 Successor Id: 3 +2018/05/03 19:38:31 Predecessor Id: nil +2018/05/03 19:38:31 ++++END of Contents of Node 3+++ +2018/05/03 19:38:31 +++END OF LIST OF NODES CURRENTLY IN THE RING+++ +signal: killed