diff --git a/Cluster/Node_cs/Dockerfiles/aot/Dockerfile b/Cluster/Node_cs/Dockerfiles/aot/Dockerfile index 5735b35..4444ec7 100644 --- a/Cluster/Node_cs/Dockerfiles/aot/Dockerfile +++ b/Cluster/Node_cs/Dockerfiles/aot/Dockerfile @@ -23,7 +23,6 @@ RUN apk add libc6-compat # Set the working directory inside the Docker image WORKDIR /app -RUN apk add curl # Copy the published application COPY --from=build /app/publish/* . # Set the entry point for the container diff --git a/Cluster/Node_cs/NodeBehavior.cs b/Cluster/Node_cs/NodeBehavior.cs index 44bced4..fe0f053 100644 --- a/Cluster/Node_cs/NodeBehavior.cs +++ b/Cluster/Node_cs/NodeBehavior.cs @@ -140,9 +140,6 @@ private static int BinarySearchFittingNode(List hashValues, int ai int upperBound = len -1; int lowerBound = 0; Console.WriteLine("Binary searching for NodeResponses: "); - foreach (NodeResponse node in hashValues){ - Console.WriteLine(""+node.hash); - } Console.WriteLine("Trying to find node for hashValue: "+aimedValue); while (true){ int currentValue = hashValues[index].hash; @@ -353,25 +350,6 @@ private static List ParseNodeResponsesFromResponse(String response public static String GetHoldingNode(int x, int y, ApiConfig config){ Tuple key = new Tuple(x, y); - //this was the old way of getting the node faster, but since the values are now redistributed automatically, this needs to be reworked -/* if (config.exteriorValuesInNodes.TryGetValue(key, out string? value)){ - TcpClient tcpClient = new TcpClient(); - var result = tcpClient.BeginConnect(value, 5552, null, null); - var success = result.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(22)); - if (success) - { - tcpClient.EndConnect(result); - tcpClient.Close(); - return value; - } - else{ - Console.WriteLine("Failed to connect to known node, requesting new information ... "); - tcpClient.Close(); - } - } else { - Console.WriteLine("No information about node found, requesting new information ... "); - } */ - TcpClient tcpClient2 = new TcpClient(); var result2 = tcpClient2.BeginConnect(config.COORDINATOR_SERVICE_URL, config.PORT, null, null); var success2 = result2.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(150));