12

I have some C++ services running on server and a node server program listening to a specific port. Can I use shared memory between C++ services and nodejs program? I want users to send data through nodejs server and those C++ services access them. Is it possible?

JalalJaberi
  • 2,417
  • 8
  • 25
  • 41

2 Answers2

5

I tried write a C/C++ binding of shared memory access from nodejs. https://github.com/supipd/node-shm

Still work in progress (but working for me), maybe usefull, if bug or suggestion, inform me.

supipd
  • 319
  • 3
  • 10
3

You can write a binding to C/C++. Start from http://howtonode.org/how-to-module (Writing a Binding section).

Within the binding code, you can use shared memory to your C++ service, although it may make more sense to link directly to the service if it makes sense.

Pascal Belloncle
  • 11,184
  • 3
  • 56
  • 56