Re: [Jcyclone-users] a few questions
Brought to you by:
jm7
|
From: Toli K. <to...@ma...> - 2006-12-21 20:10:00
|
Alexandre, I think what you are trying to accomplish is doable, but will require a bit more manual setup. Also, perhaps Jean Morrissette can weigh in on this, since we've only used JCyclone in a simple straight linear stage setup. Out-of-the-box, i think it's setup to be "one-in one-out" linear chain (see the org.jcyclone.core.basic.GenericHandler). > - run multiple event consumer instances from an incoming event queue > - deliver the output events not to one listener but to possibly > multipe listener instances as well (ie input queue / output queue > introduced) It's pretty easy to configure it to have multiple ins (we had that with JMS and FIX adapters all feeding to one OrderManager, for example). To have "fan in, fan out" (ie multiple in/multiple out) you need to do more manual work. You can configure each stage to have multiple next stages (ie next_stage_1, next_stage_2), then you need to manually read that out and store pointers to the next stages during the init() method. > - for both queues perform self tuning so that I don't need to wonder > how many thread I should use here and there Unfortunately, I'm not familiar with inner magic of JCyclone enough to know how well it does self-tuning automatically. > - possibly enforce ordering among input events if needed, and/or add a > buffered sort stage that helps to deal with out of order events > (possibly with timeout so as to no retain events too long on low load) > - possibly enforce throttling (load shedding by rejection and/or send > side blocking) so if you are doing fan in/fan out, you may have to do the load-balancing yourself inside your fan-out stage. not sure if there's built-in functionality in JCyclone to handle this. > - provide me some reporting / stats measurements > - hide all thread / thread pool coding (be it Java 1.4 or 5) that i think is doable - i'm pretty sure there are some ways to get the stats out, and the threading code is definitely hidden for you. We added TPSSchedulerConcurrent to utilize the Java 1.5 util.concurrent code, otherwise, the threading is done using manual lower-level constructs afaik. hope this helps. keep us posted on what you discover, it'd be good to have more of this documented somehwere. Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |