Hi,
Is there an equivalent in java or jruby for backgroundrb, that runs on
an application server like glassfish?
I want to offload long running tasks in another thread (or process or
whatever) and query the status of the task.
I did a quick search on the mailing list and found several other
threads about the topic, but no one had a good recommendation.
Has something changed about this topic?
You could certainly wrap a JRuby runtime in a Java object that provided
interfaces to query the interior task, and use that on within whatever
Java framework you wanted. That’s the approach that GlassFish uses to
provide support for ruby-based web frameworks. Would that work in your
situation?
you can use ruffus-scheduler, which just uses plain Ruby Threads. In
JRuby
they are (fortunately) mapped to native threads, so everything should
work
fine.
Hi,
so the solution I want to work on is using workling (yes, it’s a rails
app, I forgot to mention that) and spawn, which is configurable to use
threads instead of forking itself.
I’ll let you know if it works.