From 38b88a589bdcafb063212d3c577d6397fd76d67b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 20 Oct 2021 12:05:19 +0200 Subject: [PATCH] Fixing Port Numbers --- Desktop/DesktopApp.js | 10 ++++------ Projects/Social-Trading/DK/modules/SocialGraph.js | 8 +++++++- .../Social-Trading/DK/modules/WebSocketsInterface.js | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index 8f3883460..4235ab1b5 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -8,16 +8,14 @@ exports.newDesktopApp = function newDesktopApp() { async function run() { /* - Heree we will store our running objects: + Here we will store our running objects: */ DK.running = {} - /* - This is the Web Sockets client that interacts with the Superalgos Network. + This is the Personal Social Graph for the user running this App. */ DK.running.socialGraph = DK.projects.socialTrading.modules.socialGraph.newSocialTradingModulesSocialGraph() await DK.running.socialGraph.initialize() - /* This is the Web Sockets client that interacts with the Superalgos Network. */ @@ -25,11 +23,11 @@ exports.newDesktopApp = function newDesktopApp() { await DK.running.webSocketsClient.initialize() console.log('Desktop Client Connected to Network Node via Web Sockets ................... Connected to port ' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT) - /* These are the Network Interfaces by which the UI interacts with the Desktop App.*/ + /* These are the Network Interfaces by which the Web App interacts with this Desktop Client.*/ DK.running.webSocketsInterface = DK.projects.socialTrading.modules.webSocketsInterface.newDesktopModulesWebSocketsInterface() DK.running.webSocketsInterface.initialize() - console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.PLATFORM_WEB_SOCKETS_INTERFACE_PORT) + console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) DK.running.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface() diff --git a/Projects/Social-Trading/DK/modules/SocialGraph.js b/Projects/Social-Trading/DK/modules/SocialGraph.js index 1b67a534a..0d24d40b2 100644 --- a/Projects/Social-Trading/DK/modules/SocialGraph.js +++ b/Projects/Social-Trading/DK/modules/SocialGraph.js @@ -4,8 +4,14 @@ exports.newSocialTradingModulesSocialGraph = function newSocialTradingModulesSoc the user profile of the user of the Desktop App. A personal social graph is very similar to the one mantained at a Netwrok Node, the mainn difference is that it only includes information relevant - to this particular user, and not for al the users in the system + to this particular user, and not for all Superalgos users as in the Network Node. + + Why we need this? + + Because we need to minimize the calls to the network. There might be + information that the web app needs that we already have, so there is + no need to ask it to a network node. */ let thisObject = { initialize: initialize, diff --git a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js index 562c5b5e9..2f739ce9c 100644 --- a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js +++ b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js @@ -45,7 +45,7 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock webApp = { socket: socket } - console.log('Desktop Web App Connected to Web Sockets Interface ......................... Connected to port ' + global.env.PLATFORM_WEB_SOCKETS_INTERFACE_PORT) + console.log('Desktop Web App Connected to Web Sockets Interface ......................... Connected to port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) webApp.socket.on('close', onConnectionClosed) webApp.socket.on('message', onMenssage) @@ -92,7 +92,7 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock function onConnectionClosed() { webApp = undefined - console.log('Desktop Web App Discoonnected from Web Sockets Interface ................... Disonnected from port ' + global.env.PLATFORM_WEB_SOCKETS_INTERFACE_PORT) + console.log('Desktop Web App Discoonnected from Web Sockets Interface ................... Disonnected from port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) } } catch (err) {