> (I'm not sure how well maintained it is, and for performance > sensitive work there's a significant overhead.)
Depending on how important this is for you and how far you want/can go. You can consider using Tims Luvit instead of node: http://luvit.io/ It is (mostly) the same architecture idea as node but with Lua instead of Javascript. A main advantage of it is exactly this issue: the script-native barrier of the respective ffi is very small compared to javascript. The main disadvantage I see, you can no longer share common code between server and client. Kind regards, Axel On Wed, Feb 12, 2014 at 12:18 PM, Peter Tribble <[email protected]>wrote: > On Wed, Feb 12, 2014 at 11:00 AM, Liam <[email protected]> wrote: > >> Is anyone aware of a module which would allow most C/C++ libraries to be >> accessed from node.js apps with minimal work? >> > > That sounds rather like node-ffi. Using ffi is a way to do > exactly what you describe, and is used in other languages. > > (I'm not sure how well maintained it is, and for performance > sensitive work there's a significant overhead.) > > >> Just brainstorming, I imagine this could be done by loading the library >> in a generic process that provides an efficient IPC service. >> Library-specific glue code to handle IPC msgs would be confined to that >> process, and not use the (arcane) V8 api. A generic node module would >> provide the IPC client. >> >> I've written or contributed to a handful of C++ glue modules for >> libraries and they're a pain to write and debug. Glue and library bugs can >> crash node. And glue modules by different authors look different, so >> they're hard to comprehend and extend. >> >> Pointers? Comments? >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "nodejs" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > -Peter Tribble > http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/ > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
