From: "Mauricio Fernández" Date: 2003-08-14T00:36:23+09:00 Subject: Re: Java/Ruby communication On Thu, Aug 14, 2003 at 12:23:11AM +0900, Nigel Gilbert wrote: > I am planning to write a Java program and and a Ruby program and have > them intercommunicate, with a bidirectional flow of fairly small > amounts of data from one to to the other and back. I know that I could > achieve this by running the ruby program in JRuby, but it would not run > fast enough (a crude benchmark implies that JRuby executes Ruby about > an order of magnitude slower than I would get using Ruby itself). > > The communication could, I suppose, be done with pipes or TCP or even > by reading and writing files. Does anyone have experience of doing > this, and tips or code snippets they could share? [shameless plug] if you can afford to wait for some time you could use rjni, which provides transparent, seamless Java/Ruby interaction via JNI. It allows you to instantiate Java classes from Ruby, call Java methods, implement Java interfaces with Ruby objects, etc... I am currently re-implementing several parts of rjni in C for performance reasons. I cannot give any guarantee whatsoever on the release date (the fact that I've had no connectivity for nearly 3 weeks hasn't helped either). -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Windows without the X is like making love without a partner. -- MaDsen Wikholm, mwikholm@at8.abo.fi