Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

I have a main Node.js API application that needs to generate a PDF file, the only mature PDF generator is Prawn PDF, which is written in Ruby.

I basically need to spawn a Ruby process from Node.js, pass it an arbitrary JSON payload, then listen for contents returned by the Ruby process, and then download it in the browser.

  1. What would be the most efficient method for Node.js to spawn/start a Ruby process?

  2. How should Node.js pass information efficiently to the Ruby process? currently I am using a JSON payload, however, Ruby have to parse this, and I don't believe this is the fastest in terms of performance. Is there something more efficient that I can use to pass information between the two processes?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.