Skip to content

Commit

Permalink
Merge pull request #22 from Saetch/18-add-webui
Browse files Browse the repository at this point in the history
[#18]Cleaned up Dockerfile, removed curl
  • Loading branch information
Saetch authored Jun 4, 2024
2 parents 0dea42c + 99d1aab commit 5d46b56
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion Cluster/Node_cs/Dockerfiles/aot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 0 additions & 22 deletions Cluster/Node_cs/NodeBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ private static int BinarySearchFittingNode(List<NodeResponse> 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;
Expand Down Expand Up @@ -353,25 +350,6 @@ private static List<NodeResponse> ParseNodeResponsesFromResponse(String response
public static String GetHoldingNode(int x, int y, ApiConfig config){
Tuple<int, int> key = new Tuple<int, int>(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));
Expand Down

0 comments on commit 5d46b56

Please sign in to comment.