this could be a very stupid question - i am hoping at least.
i have written a little application using jruby.
when i do
jruby -S myapp.rb
I am assuming that jvm is loaded, then jruby and then myapp.rb
I actually want to start myapp a number of times so it can do its
stuff in parallel. When I do that it seems that jvm, jruby and
myapp.rb all get loaded into memory again - which is what i would
expect.
Question: how would I go about just loading and executing myapp.rb
multiple times as separate processes which would not involve loading
jvm jruby each time?
Hi Jason,
inside java code You can use jsr233 (java scripting api) or the new
RedBridge implementation. That way You can have one master process in
java that will start threads that will execute your ruby script. One
other way would be to do it with ruby master process run inside jruby
and using eval method to run your script in threads.