Integrating Calabash in a Web application

I want to use calabash in a web application when I'd like to load all my 
pipelines at once and then execute anyone of them whenever a request is 
received. Also I would like to cache each pipeline in a way that I don't 
have to initiate it again and again and just execute it with the input 
document in source port.

How multi-threading will work here by the way? I've seen that calabash 
is not thread safe?

What will happen now in following case:

runtime = new XProcRuntime(new XProcConfiguration()) ;

XPipeline pipe1 = runtime.load(pipeXdm);
XPipeline pipe2 = runtime.load(pipe2Xdm);


1. Can I run pipe1 and pipe2 at the same time in different threads?
2. Can I run pipe1/pipe2 simultaneously in different threads?

I want to achieve at least 1 if not 2. Any recommendations/thoughts 
sample code would be a a life saver for me.

What are the memory statistics of runtime and cached pipelines? Can I 
create 50 runtimes and load 10 pipelines for each to build a reusable 
cache? Any thoughts?

I wish If I had a proper tutorial about this. This is way to important 
for a newbie developer in this technology. This is just killing me at 
the moment.

Thanks,
-- 
*Alam Sher Khan*

Received on Tuesday, 8 February 2011 23:07:04 UTC