From e262d18ffdd1c4ab0c6fdb22f0687daf9c91e75f Mon Sep 17 00:00:00 2001 From: NicN11 Date: Wed, 10 Nov 2021 07:45:47 +0100 Subject: [PATCH 1/6] Translation into german of: "Chapter X - Install a New Market" --- ...-007-tutorial-topic-set-up-the-market.json | 24 +++++++++++++++--- ...008-tutorial-step-set-up-the-market-1.json | 24 +++++++++++++++--- ...009-tutorial-step-set-up-the-market-2.json | 16 ++++++++++-- ...010-tutorial-step-set-up-the-market-3.json | 16 ++++++++++-- ...011-tutorial-step-set-up-the-market-4.json | 15 +++++++++++ ...012-tutorial-topic-install-the-market.json | 15 +++++++++++ ...3-tutorial-topic-network-verification.json | 15 +++++++++++ ...-tutorial-step-network-verification-1.json | 25 +++++++++++++++++++ ...-tutorial-step-network-verification-2.json | 25 +++++++++++++++++++ ...-tutorial-step-network-verification-3.json | 24 +++++++++++++++++- ...-tutorial-step-network-verification-4.json | 20 +++++++++++++++ ...18-tutorial-topic-charts-verification.json | 20 +++++++++++++++ ...9-tutorial-step-charts-verification-1.json | 20 +++++++++++++++ ...0-tutorial-step-charts-verification-2.json | 20 +++++++++++++++ ...market-021-tutorial-topic-you-made-it.json | 10 ++++++++ 15 files changed, 278 insertions(+), 11 deletions(-) diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-007-tutorial-topic-set-up-the-market.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-007-tutorial-topic-set-up-the-market.json index bdad3b88d..5ede5d2b5 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-007-tutorial-topic-set-up-the-market.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-007-tutorial-topic-set-up-the-market.json @@ -12,7 +12,13 @@ { "language": "ES", "text": "Si no hay un Market configurado con el par con el que deseas trabajar en Exchange Markets, debes configurar la definición de mercado antes de instalarlo.", - "updated": 1629164083032 + "updated": 1629164083032, + "style": "Definition" + }, + { + "language": "DE", + "text": "Wenn für das Paar, mit dem Sie arbeiten möchten, unter Exchange Markets kein Market eingerichtet ist, müssen Sie die Marktdefinition vor der Installation einrichten.", + "updated": 1635829019620 } ] }, @@ -24,7 +30,13 @@ { "language": "ES", "text": "Los siguientes pasos te enseñarán cómo configurar el mercado para que puedas instalarlo más tarde.", - "updated": 1629164109911 + "updated": 1629164109911, + "style": "Callout" + }, + { + "language": "DE", + "text": "In den nächsten Schritten lernen Sie, wie Sie den Markt einrichten, damit Sie ihn später installieren können.", + "updated": 1635829102056 } ] }, @@ -36,7 +48,13 @@ { "language": "ES", "text": "Asegúrese de que la combinación de Market Base Asset y Market Quoted Asset que desea definir como Market en Superalgos existe como un mercado que cotiza en el exchange.", - "updated": 1629164457557 + "updated": 1629164457557, + "style": "Important" + }, + { + "language": "DE", + "text": "Stellen Sie sicher, dass die Kombination aus Market Base Asset und Market Quoted Asset, die Sie als Market in Superalgos definieren möchten, als börsennotierter Markt existiert.", + "updated": 1635829254330 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-008-tutorial-step-set-up-the-market-1.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-008-tutorial-step-set-up-the-market-1.json index f5f88d3a1..b8d534385 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-008-tutorial-step-set-up-the-market-1.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-008-tutorial-step-set-up-the-market-1.json @@ -12,7 +12,13 @@ { "language": "ES", "text": "Añade un nuevo nodo Market usando el Add Market opción en el menú.", - "updated": 1629164947647 + "updated": 1629164947647, + "style": "Definition" + }, + { + "language": "DE", + "text": "Fügen Sie einen neuen Market knoten hinzu, indem Sie die Option Market hinzufügen im Menü wählen.\n", + "updated": 1635829868443 } ] }, @@ -25,7 +31,13 @@ { "language": "ES", "text": "Se debe agregar un nodo de Market con dos descendientes: a Market Base Asset y a Market Quoted Asset.", - "updated": 1629165004233 + "updated": 1629165004233, + "style": "Success" + }, + { + "language": "DE", + "text": "Ein Market knoten sollte mit zwei Ablegern hinzugefügt werden: einem Market Base Asset und einem Market Quoted Asset.", + "updated": 1635830106575 } ] }, @@ -36,7 +48,13 @@ { "language": "ES", "text": "Antes de continuar, asegúrate de cuál es la base y cuál es el asset cotizado en la cotización de el exchange. Por lo general, el asset base es el primero en el nombre del par, pero esto no se aplica en todos los exchanges, así que esté atento.", - "updated": 1629165598676 + "updated": 1629165598676, + "style": "Important" + }, + { + "language": "DE", + "text": "Bevor Sie fortfahren, vergewissern Sie sich, welches der Basiswert und welches der börsennotierte Vermögenswert in der Börsennotierung ist. In der Regel ist der Basiswert der erste im Namen des Paares, aber das wird nicht an jeder Börse durchgesetzt, also seien Sie wachsam.", + "updated": 1635830457846 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-009-tutorial-step-set-up-the-market-2.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-009-tutorial-step-set-up-the-market-2.json index b1af9bfbf..e2a3d6f92 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-009-tutorial-step-set-up-the-market-2.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-009-tutorial-step-set-up-the-market-2.json @@ -12,7 +12,13 @@ { "language": "ES", "text": "Establecer una referencia de el nodo Market Base Asset en el Market que acabas de definir a el correspondiente nodo Asset definido bajo Exchange Assets.", - "updated": 1629165785229 + "updated": 1629165785229, + "style": "Definition" + }, + { + "language": "DE", + "text": "Stellen Sie einen Verweis vom Knoten Market Base Asset im soeben definierten Market auf den entsprechenden Asset Knoten unter Exchange Assets her.", + "updated": 1635832090712 } ] }, @@ -24,7 +30,13 @@ { "language": "ES", "text": "Si no estás familiarizado con el establecimiento de referencias, lee sobre el tema en la documentación.", - "updated": 1629165919563 + "updated": 1629165919563, + "style": "Note" + }, + { + "language": "DE", + "text": "Wenn Sie mit der Erstellung von Verweisen nicht vertraut sind, lesen Sie bitte in der Dokumentation über dieses Thema.", + "updated": 1635832150842 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-010-tutorial-step-set-up-the-market-3.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-010-tutorial-step-set-up-the-market-3.json index d1d9a759b..8c93cdfb4 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-010-tutorial-step-set-up-the-market-3.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-010-tutorial-step-set-up-the-market-3.json @@ -12,7 +12,13 @@ { "language": "ES", "text": "Ahora establece una referencia del nodo Market Quoted Asset en el Market que acaba de definir a la correspondiente nodo Asset definido bajo Exchange Assets.", - "updated": 1629166070472 + "updated": 1629166070472, + "style": "Definition" + }, + { + "language": "DE", + "text": "Stellen Sie nun einen Verweis vom Knoten Market Quoted Asset im soeben definierten Market auf den entsprechenden Asset Knoten unter Exchange Assets her.", + "updated": 1635832310411 } ] }, @@ -25,7 +31,13 @@ { "language": "ES", "text": "¡Ya casi has terminado con estas referencias!", - "updated": 1629166084110 + "updated": 1629166084110, + "style": "Success" + }, + { + "language": "DE", + "text": "Sie sind mit diesen Referenzen fast fertig!", + "updated": 1635832357018 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-011-tutorial-step-set-up-the-market-4.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-011-tutorial-step-set-up-the-market-4.json index aaa5b3787..0e1c1d0c7 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-011-tutorial-step-set-up-the-market-4.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-011-tutorial-step-set-up-the-market-4.json @@ -14,6 +14,11 @@ "language": "ES", "text": "Etiqueta el Market con los nombres de ticker correspondientes a el Market Base Asset ay el Market Quoted Asset, al igual que la lista de exchange.", "updated": 1629247010585 + }, + { + "language": "DE", + "text": "Beschriften Sie den Market mit den Tickernamen, die dem Market Base Asset und dem Market Quoted Asset entsprechen, genau wie bei der Börsennotierung.", + "updated": 1636093674049 } ] }, @@ -27,6 +32,11 @@ "language": "ES", "text": "Por ejemplo: ETH/USDT.", "updated": 1629247028876 + }, + { + "language": "DE", + "text": "Zum Beispiel: ETH/USDT", + "updated": 1636093747607 } ] }, @@ -38,6 +48,11 @@ "language": "ES", "text": "Manteniendo un ordenado Workspace con etiquetas adecuadas para nodos importantes, ayuda a gestionar grandes operaciones y a administrar la complejidad. ¡Estas etiquetas pueden ser utilizadas por otros nodos!", "updated": 1629247073143 + }, + { + "language": "DE", + "text": "Ein aufgeräumter Workspace mit den richtigen Bezeichnungen für wichtige Knoten hilft bei der Verwaltung großer Vorgänge und der Beherrschung der Komplexität. Diese Bezeichnungen können von anderen Knoten verwendet werden!", + "updated": 1636093838222 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-012-tutorial-topic-install-the-market.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-012-tutorial-topic-install-the-market.json index 700573dfe..df406730b 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-012-tutorial-topic-install-the-market.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-012-tutorial-topic-install-the-market.json @@ -14,6 +14,11 @@ "language": "ES", "text": "¡Terminaste la configuración requerida para instalar el mercado! ¡El resto está completamente automatizado!", "updated": 1629247436746 + }, + { + "language": "DE", + "text": "Sie haben die für die Installation des Marktes erforderliche Einrichtung abgeschlossen! Der Rest ist vollständig automatisiert!", + "updated": 1636093926793 } ] }, @@ -27,6 +32,11 @@ "language": "ES", "text": "Haz clic en el botón Install Market en el nodo Market que acabas de terminar de configurar. Ahora que el Market está configurado, instalarlo está a solo un clic de distancia.", "updated": 1629247557848 + }, + { + "language": "DE", + "text": "Klicken Sie auf die Schaltfläche Install Market auf dem Market Knoten, den Sie gerade eingerichtet haben. Jetzt, wo der Market eingerichtet ist, ist die Installation nur noch einen Klick entfernt.", + "updated": 1636094308147 } ] }, @@ -38,6 +48,11 @@ "language": "ES", "text": "La Install Market La función configura muchas estructuras de datos en el local Network Node y en el Charting Space. Los siguientes pasos del tutorial te ayudarán a familiarizarse con la instalación.", "updated": 1629247622619 + }, + { + "language": "DE", + "text": "Die Funktion Install Market richtet viele Datenstrukturen im lokalen Netzwerk Node und im Charting Space ein. Die nächsten Schritte des Tutorials werden Ihnen helfen, sich mit der Installation vertraut zu machen.", + "updated": 1636094597272 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-013-tutorial-topic-network-verification.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-013-tutorial-topic-network-verification.json index 7aaa110ea..cd9e2c728 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-013-tutorial-topic-network-verification.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-013-tutorial-topic-network-verification.json @@ -13,6 +13,11 @@ "language": "ES", "text": "La instalación de la función Market configura muchas estructuras de datos en el local Network Node.", "updated": 1629247715120 + }, + { + "language": "DE", + "text": "Die Funktion Install Market richtet im lokalen Netzwerk Node viele Datenstrukturen ein.", + "updated": 1636356142878 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "En los siguientes pasos, verificarás que cada una de las estructuras de datos esperadas se haya creado correctamente. Las estructuras esperadas son:", "updated": 1629247883351 + }, + { + "language": "DE", + "text": "In den nächsten Schritten werden Sie überprüfen, ob jede der erwarteten Datenstrukturen erfolgreich erstellt wurde. Die erwarteten Strukturen sind:", + "updated": 1636356136312 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "1. Data Tasks tareas para todas las minas de datos incluidas en tu espacio de trabajo.2. Backtesting and live trading tasks for all included trading systems.3. The corresponding Data Storage definitions.", "updated": 1629247909377 + }, + { + "language": "DE", + "text": "1. Data Tasks Aufgaben für alle in Ihrem Arbeitsbereich enthaltenen Datenminen.

2. Backtesting- und Live-Trading-Aufgaben für alle enthaltenen Handelssysteme.

3. Die entsprechenden Datenspeicher-Definitionen.", + "updated": 1636356007305 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-014-tutorial-step-network-verification-1.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-014-tutorial-step-network-verification-1.json index c128d36f4..f6643e350 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-014-tutorial-step-network-verification-1.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-014-tutorial-step-network-verification-1.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que las tareas del Data Tasks para el correspondiente Market fueron creadas con éxito.", "updated": 1629248555223 + }, + { + "language": "DE", + "text": "Überprüfen Sie, ob die Data Tasks Aufgaben für den entsprechenden Market erfolgreich erstellt wurden.", + "updated": 1636356364788 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Busca las siguientes estructuras de datos:", "updated": 1629248659569 + }, + { + "language": "DE", + "text": "Suchen Sie nach den folgenden Datenstrukturen:", + "updated": 1636356678861 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Un nodo Market Data Tasks para el nuevo mercado.", "updated": 1629248644175 + }, + { + "language": "DE", + "text": "Ein Market Data Tasks Knoten für den neuen Markt.", + "updated": 1636356689571 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Un nodo Data Mine Taskspor cada Data Mine incluido en el Workspace.", "updated": 1629248688491 + }, + { + "language": "DE", + "text": "Ein Data Mine Tasks Knoten für jeden im Workspace enthaltene Data Mine.", + "updated": 1636356757955 } ] }, @@ -58,6 +78,11 @@ "language": "ES", "text": "Un Task Manager por Data Mine y un Task para cada bot definido en cada mina de datos.", "updated": 1629248744863 + }, + { + "language": "DE", + "text": "Ein Task Manager pro Data Mine und ein Task für jeden Bot, der in jedem Datenmine definiert ist.", + "updated": 1636356814073 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-015-tutorial-step-network-verification-2.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-015-tutorial-step-network-verification-2.json index 0dd55d075..7616c4778 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-015-tutorial-step-network-verification-2.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-015-tutorial-step-network-verification-2.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que las tareas del Testing Trading Tasks del correspondiente Market fueron creados con éxito.", "updated": 1629248966784 + }, + { + "language": "DE", + "text": "Vergewissern Sie sich, dass die Testing Trading Tasks für den entsprechenden Market erfolgreich erstellt wurden.", + "updated": 1636468598028 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Busca las siguientes estructuras de datos:", "updated": 1629249005363 + }, + { + "language": "DE", + "text": "Suchen Sie nach den folgenden Datenstrukturen:", + "updated": 1636468630701 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Un nodo Market Trading Tasks para el nuevo mercado.", "updated": 1629249052629 + }, + { + "language": "DE", + "text": "Ein Market Trading Tasks Knoten für den neuen Markt.", + "updated": 1636468840153 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Un Trading Mine Tasks nodo para cada mina comercial incluida en el Workspace.", "updated": 1629249077978 + }, + { + "language": "DE", + "text": "Ein Knoten Trading Mine Tasks für jede im Workspace enthaltene Handelsmine.", + "updated": 1636468853305 } ] }, @@ -58,6 +78,11 @@ "language": "ES", "text": "Un Task Manager por mina comercial y un Task con un Backtesting Session para cada Trading System en el espacio de trabajo.", "updated": 1629249127594 + }, + { + "language": "DE", + "text": "Ein Task Manager pro Handelsmine und ein Task mit einer Backtesting Session für jedes Trading System im Arbeitsbereich.", + "updated": 1636468875339 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-016-tutorial-step-network-verification-3.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-016-tutorial-step-network-verification-3.json index 65c9a71a9..e74e6b0c2 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-016-tutorial-step-network-verification-3.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-016-tutorial-step-network-verification-3.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que las tareas Production Trading Tasks se crearon con éxito para el Market correspondiente.", "updated": 1629249520590 + }, + { + "language": "DE", + "text": "Überprüfen Sie, ob die Production Trading Tasks für den entsprechenden Market erfolgreich erstellt wurden.", + "updated": 1636468982204 } ] }, @@ -36,12 +41,24 @@ "language": "ES", "text": "Un Market Trading Tasks nodo para el nuevo mercado.", "updated": 1629249638874 + }, + { + "language": "DE", + "text": "Ein Market Trading Tasks Knoten für den neuen Markt.", + "updated": 1636469204941 } ] }, { "style": "List", - "text": "One Trading Mine Tasks node for each trading mine included in the workspace." + "text": "One Trading Mine Tasks node for each trading mine included in the workspace.", + "translations": [ + { + "language": "DE", + "text": "Ein Knoten Trading Mine Tasks für jede im Arbeitsbereich enthaltene Handelsmine.", + "updated": 1636469220146 + } + ] }, { "style": "List", @@ -51,6 +68,11 @@ "language": "ES", "text": "Un Task Manager por Trading Mine y un Task con una Backtesting Session para cada Trading System en el espacio de trabajo.", "updated": 1629249792961 + }, + { + "language": "DE", + "text": "Ein Task Manager pro Trading Mine und eine Task mit einer Backtesting Session für jedes Trading System im Arbeitsbereich.", + "updated": 1636469243913 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-017-tutorial-step-network-verification-4.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-017-tutorial-step-network-verification-4.json index 65cfb2e84..8143e7b84 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-017-tutorial-step-network-verification-4.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-017-tutorial-step-network-verification-4.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que los nodo Data Storage para el Market correspondiente se crearon con éxito.", "updated": 1629249917009 + }, + { + "language": "DE", + "text": "Überprüfen Sie, ob die Datenspeicherknoten für den entsprechenden Market erfolgreich erstellt wurden.", + "updated": 1636469629780 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Busque las siguientes estructuras de datos:", "updated": 1629249952621 + }, + { + "language": "DE", + "text": "Suchen Sie nach den folgenden Datenstrukturen:", + "updated": 1636469658454 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Un nodo Market Data Products bajo Data Mines Data, con un nodo Data Mine Products para cada Data Mine en el espacio de trabajo.", "updated": 1629250030704 + }, + { + "language": "DE", + "text": "Ein Knoten Market Data Products unter Data Mines Data, mit einem Knoten Data Mine Products für jede Data Mine im Arbeitsbereich.", + "updated": 1636469847598 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Un nodo Market Trading Products bajo Trading Mines Data, con un Trading Session Reference para cada sesión de trading en los entornos de prueba y producción.", "updated": 1629250105046 + }, + { + "language": "DE", + "text": "Ein Knoten Market Trading Products unter Trading Mines Data, mit einer Trading Session Reference für jede Handelssitzung in den Test- und Produktionsumgebungen.", + "updated": 1636469864913 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-018-tutorial-topic-charts-verification.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-018-tutorial-topic-charts-verification.json index 7b317adbe..b30374277 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-018-tutorial-topic-charts-verification.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-018-tutorial-topic-charts-verification.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Más allá de las estructuras de datos configuradas en la jerarquía de la Network, la función Install Market también configura gráficos que coinciden las sesiones de trading creadas.", "updated": 1629250291168 + }, + { + "language": "DE", + "text": "Neben den Datenstrukturen, die in der Netzwerkhierarchie eingerichtet werden, richtet die Funktion Market installieren auch Charts ein, die zu den erstellten Handelssitzungen passen.", + "updated": 1636469963838 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "En los siguientes pasos, verificará que las estructuras de datos esperadas se hayan creado correctamente.", "updated": 1629250307906 + }, + { + "language": "DE", + "text": "In den nächsten Schritten werden Sie überprüfen, ob die erwarteten Datenstrukturen erfolgreich erstellt wurden.", + "updated": 1636470004914 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Los gráficos creados permiten trabajar con las Trading Session de forma independiente.", "updated": 1629250720714 + }, + { + "language": "DE", + "text": "Die erstellten Charts ermöglichen es, mit jeder der Handelssitzungen unabhängig zu arbeiten.", + "updated": 1636470034665 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Observa desde la organización de los gráficos que Superalgos permite escalar tu operación a gráficos y sistemas comerciales ilimitados.", "updated": 1629250466323 + }, + { + "language": "DE", + "text": "Beachten Sie bei der Organisation der Charts, dass Superalgos die Skalierung Ihrer Operation auf eine unbegrenzte Anzahl von Handelssystemen und Charts ermöglicht.", + "updated": 1636470077906 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-019-tutorial-step-charts-verification-1.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-019-tutorial-step-charts-verification-1.json index 74651efad..74687e347 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-019-tutorial-step-charts-verification-1.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-019-tutorial-step-charts-verification-1.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que las estructuras de datos del Charting Space para el mercado correspondiente se crearon con éxito.", "updated": 1629251098125 + }, + { + "language": "DE", + "text": "Überprüfen Sie, ob die Charting Space Datenstrukturen für den entsprechenden Market erfolgreich erstellt wurden.", + "updated": 1636470181662 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Busca las siguientes estructuras de datos:", "updated": 1629251126491 + }, + { + "language": "DE", + "text": "Suchen Sie nach den folgenden Datenstrukturen:", + "updated": 1636470213873 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Un nodo Time Machine para cada Trading Session creada en el Testing Trading Tasks.", "updated": 1629251359090 + }, + { + "language": "DE", + "text": "Ein Time Machine Knoten für jede Handelssitzung, die in den Testing Trading Tasks erstellt wurde.", + "updated": 1636470376014 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Un nodo Time Machine oara cada Trading Session creada en el Production Trading Tasks.", "updated": 1629251407209 + }, + { + "language": "DE", + "text": "Ein Time Machine Knoten für jede Handelssitzung, die in den Production Trading Tasks erstellt wurde.", + "updated": 1636470394173 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json index 196162a3c..8ca30b06a 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Verifica que las máquinas del tiempo creadas aparezcan en el espacio de gráficos ... deberías encontrar ...", "updated": 1629251601715 + }, + { + "language": "DE", + "text": "Vergewissern Sie sich, dass die erstellten Zeitmaschinen in der Diagrammfläche angezeigt werden....", + "updated": 1636470446401 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Un Time Machine para cada Trading Session crada en el Testing Trading Tasks.", "updated": 1629251649077 + }, + { + "language": "DE", + "text": "Eine Time Machine für jede Handelssitzung, die in den Testing Trading Tasks erstellt wurde.", + "updated": 1636470668493 } ] }, @@ -36,6 +46,11 @@ "language": "ES", "text": "Un Time Machine para cada Trading Session creado en el Production Trading Tasks.", "updated": 1629251693396 + }, + { + "language": "DE", + "text": "Eine Time Machine für jede Handelssitzung, die in den Production Trading Tasks erstellt wurde.", + "updated": 1636470688537 } ] }, @@ -47,6 +62,11 @@ "language": "ES", "text": "Pasa el mouse sobre un gráfico para ver qué Crypto Exchange y Market contiene.", "updated": 1629251750388 + }, + { + "language": "DE", + "text": "Bewegen Sie den Mauszeiger über ein Diagramm, um zu sehen, welche Crypto Exchange und welchen Market es enthält.", + "updated": 1636470700735 } ] } diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-021-tutorial-topic-you-made-it.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-021-tutorial-topic-you-made-it.json index 96698688b..7d4a34078 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-021-tutorial-topic-you-made-it.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-021-tutorial-topic-you-made-it.json @@ -13,6 +13,11 @@ "language": "ES", "text": "Felicitaciones ... ¡has llegado al final de este tutorial!", "updated": 1629251820232 + }, + { + "language": "DE", + "text": "Herzlichen Glückwunsch... Sie haben das Ende des Tutorials erreicht!", + "updated": 1636470750188 } ] }, @@ -25,6 +30,11 @@ "language": "ES", "text": "Puedes volver a visitar este tutorial en cualquier momento. Si seleccionas el Play en el menú, comienza desde el principio. Si seleccionas el Resume en su lugar, comienzas donde lo dejaste por última vez o donde saltaste un paso por última vez.", "updated": 1629251900929 + }, + { + "language": "DE", + "text": "Sie können dieses Lernprogramm jederzeit wieder aufrufen. Wenn Sie im Menü die Option Play wählen, beginnen Sie direkt am Anfang. Wenn Sie stattdessen die Option Resume wählen, beginnen Sie dort, wo Sie zuletzt aufgehört haben oder wo Sie zuletzt einen Schritt übersprungen haben.", + "updated": 1636470883959 } ] } From 578f36eceb53f41db5f6427dca537b8d7da79b8a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 10 Nov 2021 12:02:02 +0100 Subject: [PATCH 2/6] Message should arrive to the Web App --- Desktop/DesktopApp.js | 10 +++ Desktop/UI/Globals.js | 2 +- Desktop/UI/WebApp.js | 15 +++-- Desktop/UI/WebAppLoader.js | 4 +- Environment.js | 2 +- .../SA/Modules/WebSocketsNetworkClient.js | 61 ++++++++----------- Projects/ProjectsSchema.json | 14 +++-- .../DK/modules/P2PNetworkInterface.js | 29 +++++++++ .../DK/modules/WebSocketsInterface.js | 7 +-- ...WebClient.js => WebSocketsWebAppClient.js} | 42 ++++++++++--- 10 files changed, 121 insertions(+), 65 deletions(-) create mode 100644 Projects/Social-Trading/DK/modules/P2PNetworkInterface.js rename Projects/Social-Trading/UI/modules/{WebSocketsWebClient.js => WebSocketsWebAppClient.js} (60%) diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index ad3aa22dd..2250a7e63 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -7,6 +7,8 @@ exports.newDesktopApp = function newDesktopApp() { p2pNetworkPeers: undefined, webSocketsClient: undefined, webSocketsInterface: undefined, + webAppInterface: undefined, + p2pNetworkInterface: undefined, socialGraph: undefined, run: run } @@ -49,6 +51,14 @@ exports.newDesktopApp = function newDesktopApp() { } async function setupServices() { + /* + This is where we will process all the messages comming from our web app. + */ + thisObject.webAppInterface = DK.projects.socialTrading.modules.webAppInterface.newSocialTradingModulesWebAppInterface() + /* + This is where we will process all the events comming from the p2p network. + */ + thisObject.p2pNetworkInterface = DK.projects.socialTrading.modules.p2pNetworkInterface.newSocialTradingModulesP2PNetworkInterface() /* This is the Personal Social Graph for the user running this App. */ diff --git a/Desktop/UI/Globals.js b/Desktop/UI/Globals.js index 2c5646491..3d3b69587 100644 --- a/Desktop/UI/Globals.js +++ b/Desktop/UI/Globals.js @@ -5,7 +5,7 @@ let UI = { schemas: { projectSchema: undefined }, environment: undefined, clientNode: undefined, - running: {} + webApp: undefined } let SA = { projects: {} } diff --git a/Desktop/UI/WebApp.js b/Desktop/UI/WebApp.js index c219e51ef..cb4b4da43 100644 --- a/Desktop/UI/WebApp.js +++ b/Desktop/UI/WebApp.js @@ -5,6 +5,7 @@ function newWebApp() { Everything is being coded here until some structure emerges. */ let thisObject = { + messageReceived: messageReceived, initialize: initialize, finalize: finalize } @@ -19,7 +20,7 @@ function newWebApp() { try { setupRootObject(UI, 'UI') setupRootObject(SA, 'SA') - await UI.projects.socialTrading.modules.webSocketsWebClient.initialize() + await UI.projects.socialTrading.modules.webSocketsWebAppClient.initialize() loadWUserProfileTimeline() loadWhoToFollow() setupEventHandlers() @@ -113,7 +114,7 @@ function newWebApp() { queryMessage: JSON.stringify(queryMessage) } - await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage( + await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage( JSON.stringify(query) ) .then(addToContentDiv) @@ -183,7 +184,7 @@ function newWebApp() { queryMessage: JSON.stringify(queryMessage) } - await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage( + await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage( JSON.stringify(query) ) .then(addWhoToFollowTable) @@ -360,7 +361,7 @@ function newWebApp() { eventMessage: JSON.stringify(eventMessage) } - await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage( + await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage( JSON.stringify(event) ) .then(resolve) @@ -396,7 +397,7 @@ function newWebApp() { eventMessage: JSON.stringify(eventMessage) } - await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage( + await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage( JSON.stringify(event) ) .then(resolve) @@ -409,4 +410,8 @@ function newWebApp() { } } } + + function messageReceived(message) { + window.alert(message) + } } diff --git a/Desktop/UI/WebAppLoader.js b/Desktop/UI/WebAppLoader.js index baa4039f0..ce4e46b77 100644 --- a/Desktop/UI/WebAppLoader.js +++ b/Desktop/UI/WebAppLoader.js @@ -98,8 +98,8 @@ function newWebAppLoader() { if (downloadedCounter === modulesArray.length) { setTimeout(() => { - UI.running.webApp = newWebApp() - UI.running.webApp.initialize() + UI.webApp = newWebApp() + UI.webApp.initialize() }, 500) } diff --git a/Environment.js b/Environment.js index 311a33c80..9b71ea677 100644 --- a/Environment.js +++ b/Environment.js @@ -28,7 +28,7 @@ exports.newEnvironment = function () { PATH_TO_MY_WORKSPACES: path.join(basePath, './Platform/My-Workspaces'), PATH_TO_FONTS: path.join(basePath, './Platform/WebServer/Fonts'), DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-1', - DESKTOP_APP_MAX_OUTGOING_PEERS: 2, + DESKTOP_APP_MAX_OUTGOING_PEERS: 1, MOBILE_APP_SIGNING_ACCOUNT: 'Social-Trading-Mobile-App-1', SERVER_APP_SIGNING_ACCOUNT: 'Social-Trading-Server-App-1', PLATFORM_APP_SIGNING_ACCOUNT: 'Algo-Traders-Platform-1', diff --git a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js index 65efc4a74..3ef9df858 100644 --- a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js +++ b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js @@ -102,7 +102,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb callerRole: thisObject.callerRole, callerProfileHandle: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle, callerTimestamp: callerTimestamp, - callerNode: JSON.stringify(thisObject.p2pNetworkIdentity.node), + callerNode: JSON.stringify(thisObject.p2pNetworkIdentity.node), step: 'One' } thisObject.socket.send(JSON.stringify(message)) @@ -112,7 +112,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb let response = JSON.parse(socketMessage.data) if (response.result !== 'Ok') { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> response.message = ' + response.message) + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> response.message = ' + response.message) reject() return } @@ -123,7 +123,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb We will check that the signature received produces a valid Blockchain Account. */ if (called.blockchainAccount === undefined) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> Signature does not produce a valid Blockchain Account.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> Signature does not produce a valid Blockchain Account.') reject() return } @@ -132,7 +132,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb the one we have on record for the user profile of the Network Node we are calling. */ if (called.blockchainAccount !== thisObject.p2pNetworkNode.blockchainAccount) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.') reject() return } @@ -145,7 +145,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb */ let hash = web3.eth.accounts.hashMessage(signature.message) if (hash !== signature.messageHash) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> signature.message Hashed Does Not Match signature.messageHash.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> signature.message Hashed Does Not Match signature.messageHash.') reject() return } @@ -154,7 +154,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb that we have on record, otherwise something is wrong and we should not proceed. */ if (signedMessage.calledProfileHandle !== thisObject.p2pNetworkNode.userProfile.userProfileHandle) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.') reject() return } @@ -163,7 +163,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb signed message, to avoid man in the middle attacks. */ if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.') reject() return } @@ -172,7 +172,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb signed message, also to avoid man in the middle attacks. */ if (signedMessage.callerTimestamp !== callerTimestamp) { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerTimestamp does not match my own callerTimestamp.') + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> The Network Node callerTimestamp does not match my own callerTimestamp.') reject() return } @@ -206,7 +206,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb let response = JSON.parse(socketMessage.data) if (response.result !== 'Ok') { - console.log('[ERROR] Web Sockets Client -> stepOneResponse -> response.message = ' + response.message) + console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> response.message = ' + response.message) reject() return } @@ -233,18 +233,18 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb function onError(err) { if (err.message.indexOf('ECONNREFUSED') >= 0) { - console.log('[WARN] Web Sockets Client -> onError -> Nobody home at ' + thisObject.host + ':' + thisObject.port) + console.log('[WARN] Web Sockets Network Client -> onError -> Nobody home at ' + thisObject.host + ':' + thisObject.port) reject() return } - console.log('[ERROR] Web Sockets Client -> onError -> err.message = ' + err.message) - console.log('[ERROR] Web Sockets Client -> onError -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Network Client -> onError -> err.message = ' + err.message) + console.log('[ERROR] Web Sockets Network Client -> onError -> err.stack = ' + err.stack) reject() return } } catch (err) { - console.log('[ERROR] Web Sockets Client -> setUpWebSocketClient -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Network Client -> setUpWebSocketClient -> err.stack = ' + err.stack) } } @@ -257,7 +257,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb function sendSocketMessage(resolve, reject) { if (thisObject.socket.readyState !== 1) { // 1 means connected and ready. - console.log('[ERROR] Web Sockets Client -> sendMessage -> Cannot send message while connection is closed.') + console.log('[ERROR] Web Sockets Network Client -> sendMessage -> Cannot send message while connection is closed.') reject('Websockets Connection Not Ready.') return } @@ -277,20 +277,20 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb if (response.result === 'Ok') { resolve(response.data) } else { - console.log('[ERROR] Web Sockets Client -> onMenssageFunction -> response.message = ' + response.message) + console.log('[ERROR] Web Sockets Network Client -> onMenssageFunction -> response.message = ' + response.message) reject(response.message) } } catch (err) { callbackFunction = undefined - console.log('[ERROR] Web Sockets Client -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Network Client -> err.stack = ' + err.stack) } } } } - function onMenssage(socketMessage) { + function onMenssage(message) { - let response = JSON.parse(socketMessage.data) + let response = JSON.parse(message.data) /* We get the function that is going to resolve or reject the promise given. */ @@ -305,33 +305,22 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb } else { /* The message received is a not response to a message sent. + That means that is a notification received from the Network Node + of an event that happened at some other Client of the Network. + + This can only happen when this module is running at an APP like the Desktop App. */ let messageHeader try { messageHeader = JSON.parse(message) } catch (err) { - console.log('[ERROR] Web Sockets Client -> onMenssage -> message = ' + message) - console.log('[ERROR] Web Sockets Client -> onMenssage -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Network Client -> onMenssage -> message = ' + message) + console.log('[ERROR] Web Sockets Network Client -> onMenssage -> err.stack = ' + err.stack) thisObject.socket.close() return } - switch (thisObject.callerRole) { - case 'Network Client': { - /* - This is the use case of a network client receiving a notification of - somethinig that happened at the network that is relevant to itself. - */ - break - } - case 'Network Peer': { - /* - No use cases so far were a Network Peer would send a message through an - incomming websockets connection, without having received a request first. - */ - break - } - } + DK.desktopApp.p2pNetworkInterface.messageReceived(messageHeader.payload) } } } \ No newline at end of file diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 93a9be097..742ad57f8 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1606,6 +1606,12 @@ "functionName": "newSocialTradingModulesWebAppInterface", "fileName": "WebAppInterface.js" }, + { + "name": "P2P Network Interface", + "propertyName": "p2pNetworkInterface", + "functionName": "newSocialTradingModulesP2PNetworkInterface", + "fileName": "P2PNetworkInterface.js" + }, { "name": "Social Graph", "propertyName": "socialGraph", @@ -1618,10 +1624,10 @@ "UI": { "modules": [ { - "name": "Web Sockets Client", - "propertyName": "webSocketsWebClient", - "functionName": "newSocialTradingModulesWebSocketsWebClient", - "fileName": "WebSocketsWebClient.js" + "name": "Web Sockets WebApp Client", + "propertyName": "webSocketsWebAppClient", + "functionName": "newSocialTradingModulesWebSocketsWebAppClient", + "fileName": "WebSocketsWebAppClient.js" } ] } diff --git a/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js b/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js new file mode 100644 index 000000000..3674307ef --- /dev/null +++ b/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js @@ -0,0 +1,29 @@ +exports.newSocialTradingModulesP2PNetworkInterface = function newSocialTradingModulesP2PNetworkInterface() { + /* + This module handles the incoming messages from the P2P Network + that are not responses to requests sent. + + This is the case for any kind of events happening at entities followed + by the user running this app, in particular trading events. + */ + let thisObject = { + messageReceived: messageReceived, + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + + } + + function initialize() { + + } + + async function messageReceived(message) { + message.messageId = undefined + DK.webSocketsInterface.sendToWebApp(JSON.stringify(response)) + } +} \ No newline at end of file diff --git a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js index d1e363c3b..5eef46ff0 100644 --- a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js +++ b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js @@ -10,23 +10,18 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock } let socketServer - let webAppInterface let webApp return thisObject function finalize() { socketServer = undefined - webAppInterface = undefined webApp = undefined } function initialize() { let port = JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webSocketsPort - socketServer = new SA.nodeModules.ws.Server({ port: port }) - webAppInterface = DK.projects.socialTrading.modules.webAppInterface.newSocialTradingModulesWebAppInterface() - setUpWebSocketServer() } @@ -67,7 +62,7 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock return } - await webAppInterface.messageReceived(messageHeader.payload) + await DK.desktopApp.webAppInterface.messageReceived(messageHeader.payload) .then(sendResponseToWebApp) .catch(onError) diff --git a/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js b/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js similarity index 60% rename from Projects/Social-Trading/UI/modules/WebSocketsWebClient.js rename to Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js index da9fb2730..9f15f93ea 100644 --- a/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js +++ b/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js @@ -1,4 +1,4 @@ -function newSocialTradingModulesWebSocketsWebClient() { +function newSocialTradingModulesWebSocketsWebAppClient() { let thisObject = { sendMessage: sendMessage, @@ -45,12 +45,12 @@ function newSocialTradingModulesWebSocketsWebClient() { } function onError(err) { - console.log('[ERROR] Web Sockets Client -> onError -> err.message = ' + err.message) - console.log('[ERROR] Web Sockets Client -> onError -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets WebApp Client -> onError -> err.message = ' + err.message) + console.log('[ERROR] Web Sockets WebApp Client -> onError -> err.stack = ' + err.stack) } } catch (err) { - console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets WebApp Client -> setUpWebsocketClient -> err.stack = ' + err.stack) } } } @@ -62,7 +62,7 @@ function newSocialTradingModulesWebSocketsWebClient() { function sendSocketMessage(resolve, reject) { if (socketClient.readyState !== 1) { // 1 means connected and ready. - console.log('[ERROR] Web Sockets Client -> sendMessage -> Cannot send message while connection is closed.') + console.log('[ERROR] Web Sockets WebApp Client -> sendMessage -> Cannot send message while connection is closed.') reject('Websockets Connection Not Ready.') return } @@ -82,26 +82,48 @@ function newSocialTradingModulesWebSocketsWebClient() { if (response.result === 'Ok') { resolve(response.data) } else { - console.log('[ERROR] Web Sockets Client -> onMenssage -> response.message = ' + response.message) + console.log('[ERROR] Web Sockets WebApp Client -> onMenssage -> response.message = ' + response.message) reject(response.message) } } catch (err) { callbackFunction = undefined - console.log('[ERROR] Web Sockets Client -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets WebApp Client -> err.stack = ' + err.stack) } } } } - function onMenssage(socketMessage) { + function onMenssage(message) { - let response = JSON.parse(socketMessage.data) + let response = JSON.parse(message.data) /* We get the function that is going to resolve or reject the promise given. */ onMenssageFunction = onMessageFunctionsMap.get(response.messageId) onMessageFunctionsMap.delete(response.messageId) - onMenssageFunction(response) + + if (onMenssageFunction !== undefined) { + /* + The message received is a response to a message sent. + */ + onMenssageFunction(response) + } else { + /* + The message received is a not response to a message sent. + That means that is a notification received from the Client App. + */ + let messageHeader + try { + messageHeader = JSON.parse(message) + } catch (err) { + console.log('[ERROR] Web Sockets WebApp Client -> onMenssage -> message = ' + message) + console.log('[ERROR] Web Sockets WebApp Client -> onMenssage -> err.stack = ' + err.stack) + thisObject.socket.close() + return + } + + UI.webApp.messageReceived(messageHeader.payload) + } } } \ No newline at end of file From efeabaa69e9b4c0824631ea3c2ee11299f29307b Mon Sep 17 00:00:00 2001 From: Smidy13 <77650800+Smidy13@users.noreply.github.com> Date: Thu, 11 Nov 2021 00:02:39 +1300 Subject: [PATCH 3/6] Bug Fix: Making Left Menu Icons Even --- .../UI/Spaces/Floating-Space/CircularMenu.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenu.js b/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenu.js index 08de42283..e3aa88200 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenu.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenu.js @@ -109,13 +109,13 @@ function newCircularMenu() { } /* There are 4 possible rings of icons, we will go through each of them here. */ - let amplitudeArray = [80, 70, 40, 80] - let initialAngleArray = [220, 205, 200, 180] - for (let j = 1; j < ringsArray.length + 1; j++) { - let iconOnlyArray = ringsArray[j - 1] + let amplitudeArray = [80, 70, 50, 80] + let initialAngleArray = [220, 215, 205, 180] + for (let j = 0; j < ringsArray.length; j++) { + let iconOnlyArray = ringsArray[j] /* Here we calculate the angles for each menu item, and then apply it if it was not previously defined. */ - let amplitude = amplitudeArray[j - 1] - let initialAngle = initialAngleArray[j - 1] + let amplitude = amplitudeArray[j] + let initialAngle = initialAngleArray[j] let step = amplitude / (iconOnlyArray.length - 1) if (iconOnlyArray.length === 1) { step = 0 @@ -132,7 +132,7 @@ function newCircularMenu() { /* Text and Icon */ let amplitude = 60 let initialAngle = -30 - step = amplitude / 7 + let step = amplitude / 7 let currentItem = (7 - iconAndTextArray.length) / 2 + 1 for (let i = 0; i < iconAndTextArray.length; i++) { let menuItem = iconAndTextArray[i] From c5564f1e697fd6bd1817c63bad22d16f8e808b22 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 10 Nov 2021 12:44:50 +0100 Subject: [PATCH 4/6] Event received from browser to browser going through 1 network node --- Desktop/DesktopApp.js | 1 - .../SA/Modules/WebSocketsNetworkClient.js | 16 ++++++++-------- .../DK/modules/P2PNetworkInterface.js | 7 +++---- .../DK/modules/WebAppInterface.js | 2 +- .../UI/modules/WebSocketsWebAppClient.js | 18 +++++++++--------- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index 2250a7e63..3a8cc7c6f 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -5,7 +5,6 @@ exports.newDesktopApp = function newDesktopApp() { p2pNetworkClient: undefined, p2pNetwork: undefined, p2pNetworkPeers: undefined, - webSocketsClient: undefined, webSocketsInterface: undefined, webAppInterface: undefined, p2pNetworkInterface: undefined, diff --git a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js index 3ef9df858..0b4322ec0 100644 --- a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js +++ b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js @@ -288,20 +288,20 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb } } - function onMenssage(message) { + function onMenssage(socketMessage) { - let response = JSON.parse(message.data) + let message = JSON.parse(socketMessage.data) /* We get the function that is going to resolve or reject the promise given. */ - let onMenssageFunction = onMessageFunctionsMap.get(response.messageId) + let onMenssageFunction = onMessageFunctionsMap.get(message.messageId) if (onMenssageFunction !== undefined) { /* The message received is a response to a message sent. */ - onMessageFunctionsMap.delete(response.messageId) - onMenssageFunction(response) + onMessageFunctionsMap.delete(message.messageId) + onMenssageFunction(message) } else { /* The message received is a not response to a message sent. @@ -310,9 +310,9 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb This can only happen when this module is running at an APP like the Desktop App. */ - let messageHeader + let event try { - messageHeader = JSON.parse(message) + event = JSON.parse(message.eventMessage) } catch (err) { console.log('[ERROR] Web Sockets Network Client -> onMenssage -> message = ' + message) console.log('[ERROR] Web Sockets Network Client -> onMenssage -> err.stack = ' + err.stack) @@ -320,7 +320,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb return } - DK.desktopApp.p2pNetworkInterface.messageReceived(messageHeader.payload) + DK.desktopApp.p2pNetworkInterface.eventReceived(event) } } } \ No newline at end of file diff --git a/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js b/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js index 3674307ef..8363dc38c 100644 --- a/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js +++ b/Projects/Social-Trading/DK/modules/P2PNetworkInterface.js @@ -7,7 +7,7 @@ exports.newSocialTradingModulesP2PNetworkInterface = function newSocialTradingMo by the user running this app, in particular trading events. */ let thisObject = { - messageReceived: messageReceived, + eventReceived: eventReceived, initialize: initialize, finalize: finalize } @@ -22,8 +22,7 @@ exports.newSocialTradingModulesP2PNetworkInterface = function newSocialTradingMo } - async function messageReceived(message) { - message.messageId = undefined - DK.webSocketsInterface.sendToWebApp(JSON.stringify(response)) + async function eventReceived(event) { + DK.desktopApp.webSocketsInterface.sendToWebApp(JSON.stringify(event)) } } \ No newline at end of file diff --git a/Projects/Social-Trading/DK/modules/WebAppInterface.js b/Projects/Social-Trading/DK/modules/WebAppInterface.js index 96830e81e..d6ef8c92c 100644 --- a/Projects/Social-Trading/DK/modules/WebAppInterface.js +++ b/Projects/Social-Trading/DK/modules/WebAppInterface.js @@ -132,7 +132,7 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule let response = { result: 'Ok', message: 'Web App Interface Event Processed.', - data: await DK.desktopApp.webSocketsClient.sendMessage(JSON.stringify(messageHeader)) + data: await DK.desktopApp.p2pNetworkPeers.sendMessage(JSON.stringify(messageHeader)) } return response } diff --git a/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js b/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js index 9f15f93ea..227719958 100644 --- a/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js +++ b/Projects/Social-Trading/UI/modules/WebSocketsWebAppClient.js @@ -94,28 +94,28 @@ function newSocialTradingModulesWebSocketsWebAppClient() { } } - function onMenssage(message) { + function onMenssage(socketMessage) { - let response = JSON.parse(message.data) + let message = JSON.parse(socketMessage.data) /* We get the function that is going to resolve or reject the promise given. */ - onMenssageFunction = onMessageFunctionsMap.get(response.messageId) - onMessageFunctionsMap.delete(response.messageId) + onMenssageFunction = onMessageFunctionsMap.get(message.messageId) + onMessageFunctionsMap.delete(message.messageId) if (onMenssageFunction !== undefined) { /* The message received is a response to a message sent. */ - onMenssageFunction(response) + onMenssageFunction(message) } else { /* The message received is a not response to a message sent. - That means that is a notification received from the Client App. + That means that is an event received from the Client App. */ - let messageHeader + let event try { - messageHeader = JSON.parse(message) + event = JSON.parse(message) } catch (err) { console.log('[ERROR] Web Sockets WebApp Client -> onMenssage -> message = ' + message) console.log('[ERROR] Web Sockets WebApp Client -> onMenssage -> err.stack = ' + err.stack) @@ -123,7 +123,7 @@ function newSocialTradingModulesWebSocketsWebAppClient() { return } - UI.webApp.messageReceived(messageHeader.payload) + UI.webApp.messageReceived(JSON.stringify(event)) } } } \ No newline at end of file From f40e4159140cd54105d62a19ab432adf0eb75682 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 10 Nov 2021 13:02:22 +0100 Subject: [PATCH 5/6] Event Reaching all Web Apps --- Environment.js | 2 +- Projects/Social-Trading/DK/modules/WebSocketsInterface.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Environment.js b/Environment.js index 9b71ea677..a599d095e 100644 --- a/Environment.js +++ b/Environment.js @@ -33,7 +33,7 @@ exports.newEnvironment = function () { SERVER_APP_SIGNING_ACCOUNT: 'Social-Trading-Server-App-1', PLATFORM_APP_SIGNING_ACCOUNT: 'Algo-Traders-Platform-1', P2P_NETWORK_NODE_SIGNING_ACCOUNT: 'P2P-Network-Node-1', - P2P_NETWORK_NODE_MAX_INCOMING_CLIENTS: 20, + P2P_NETWORK_NODE_MAX_INCOMING_CLIENTS: 1, P2P_NETWORK_NODE_MAX_INCOMING_PEERS: 2, P2P_NETWORK_NODE_MAX_OUTGOING_PEERS: 2 } diff --git a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js index 5eef46ff0..f982fcecd 100644 --- a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js +++ b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js @@ -42,7 +42,7 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock webApp = { socket: socket } - console.log('Desktop Web App Connected to Web Sockets Interface ............................. Connected to port ' + global.env.DESKTOP_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) From 57c586c28ba0dc6cabbc7762d0b7f37b379bf8ce Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 10 Nov 2021 14:53:38 +0100 Subject: [PATCH 6/6] P2P Network: - Broadcasting Events to Peers and Client Implemented --- Projects/Network/NT/Modules/WebSocketsInterface.js | 5 ----- Projects/Network/SA/Modules/WebSocketsNetworkClient.js | 2 +- Projects/Social-Trading/NT/Modules/PeerInterface.js | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Projects/Network/NT/Modules/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js index af01c391f..7854c7bb4 100644 --- a/Projects/Network/NT/Modules/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -547,11 +547,6 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock let networkClient = thisObject.networkClients[i] if (networkClient.socket.id === callerIdToAVoid) { continue } networkClient.socket.send(messageHeader.payload) - .catch(onError) - - function onError() { - console.log('[ERROR] Web Sockets Interface -> broadcastToPeers -> Sending Message Failed.') - } } } diff --git a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js index 0b4322ec0..cab9306bf 100644 --- a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js +++ b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js @@ -274,7 +274,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb function onMenssageFunction(response) { try { - if (response.result === 'Ok') { + if (response.result === 'Ok' || response.result === 'Warning') { resolve(response.data) } else { console.log('[ERROR] Web Sockets Network Client -> onMenssageFunction -> response.message = ' + response.message) diff --git a/Projects/Social-Trading/NT/Modules/PeerInterface.js b/Projects/Social-Trading/NT/Modules/PeerInterface.js index 29ff7c114..a19351adc 100644 --- a/Projects/Social-Trading/NT/Modules/PeerInterface.js +++ b/Projects/Social-Trading/NT/Modules/PeerInterface.js @@ -111,7 +111,7 @@ exports.newSocialTradingModulesPeerInterface = function newSocialTradingModulesP if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { let response = { - result: 'Ok', + result: 'Warning', message: 'Peer Interface Event Already Exists.' } return response