Talking to C++ process through N-API
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- node.js
- Ambito
- api, distributed-systems, operating-systems
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 2.6k
- Fork
- 602
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nodejs/node-addon-examples
-
Create Valgrind run of tests Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
nodejs/node-addon-examples#585 · 1 reazione ·
-
Add .d.ts files in samples. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
nodejs/node-addon-examples#530 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
nodejs/node-addon-examples#445 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
nodejs/node-addon-examples#444 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
nodejs/node-addon-examples#381 ·
Tutte le issue di nodejs/node-addon-examples
Issue simili
-
[BUG] Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
eunomia-bpf/llvmbpf#51 · 1 commento ·
-
status:needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PX4/PX4-Autopilot#28776 ·
-
Website Doc Typo Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100