Talking to C++ process through N-API
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- node.js
- Domínio
- api, distributed-systems, operating-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C++
- Estrelas
- 2.6k
- Forks
- 598
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nodejs/node-addon-examples
-
Create Valgrind run of testsAbertaenhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
nodejs/node-addon-examples#585 · 1 reação ·
-
Add .d.ts files in samples.Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
nodejs/node-addon-examples#530 · 1 comentário ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
nodejs/node-addon-examples#445 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 32/100
nodejs/node-addon-examples#444 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
nodejs/node-addon-examples#381 ·
Todas as issues de nodejs/node-addon-examples
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/microsoft-ui-xaml#12515 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
Mantenedores costumam responder em até 1 dia
-
bug difficulty: easy good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
nagisa-kamishiro/rosehip#73 ·
Mantenedores costumam responder em até 1 dia
-
bazel bug odb
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 80/100
The-OpenROAD-Project/OpenROAD#12095 · 1 comentário ·
Mantenedores costumam responder em até 1 dia