Talking to C++ process through N-API
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- node.js
- Bereich
- api, distributed-systems, operating-systems
Rechercherichtung
The issue names no repository files or tests. Start by reviewing the N-API entry point and the C++ DLL, shared-memory file mapping, and separate-process communication described in the issue. Done would require a clearly scoped example or documented support path for the requested Node.js-to-C++ process communication.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hello;
I want to send and receive data from a game simulation in a seperate C++ process, from Node.js. I want Node.js to connect to the outside internet and Node.js will need to communicate with a game simulation run in a seperate process.
Memory sharing seems to be the fastest way to do interprocess communication. Its faster than pipes or sockets, so I want to use memory sharing to do the IPC. I was thinking that N-API could be used to do this.
The question is can I use N-API to connect to a C++ DLL and create a shared memory object (file map). The DLL will be loaded into the Node.js process and it will load a DLL that has already been loaded by the C++ executable. The the file mapping of the system pagefile will be loaded into both the Node.js process and the seperate C++ process. To send something from Node.js to the C++ process, I would just call and required funtions., which would call a function in the DLL that wrote to the share memory map file. After the shared memory has been written to the, it would unblock a handle that the server has access to. The C++ process could then read the shared memory. Has anyone tried this? I mean N-API allows on to call C++ ftns in a DLL, but to call ftns in a seperate process is what I want.
- Vorherrschende Sprache
- C++
- Sterne
- 2.6k
- Forks
- 602
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nodejs/node-addon-examples
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#585 · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#530 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#445 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 32/100
nodejs/node-addon-examples#444 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#381 ·
Alle Issues in nodejs/node-addon-examples
Ähnliche Issues
-
Website Doc Typo Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 92/100
autowarefoundation/autoware_universe#13413 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
automated-analysis bug memory-safety
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100