I have not yet determined how I want to implement my problem and was hoping to get some feedback. <div><br></div><div>I am using drools to migrate the logic from my automated currency trading infrastructure. Each currency pair, i.e. eurusd has around 200 attributes associated with it.</div>
<div><br></div><div>This includes range values (high, low, average) for multiple time periods, volatility information, bid/ask updates etc.</div><div><br></div><div>Currently I have classes associated for each, so say for range:</div>
<div><br></div><div>class Range {</div><div> double high;</div><div> double low;</div><div> double avg;</div><div>}</div><div><br></div><div>Range europe = new Range(); //european trading hours</div><div>Range us = new Range(); //us trading hours</div>
<div><br></div><div><br></div><div>Questions:</div><div>1. I am wondering if I should not just create a map that lists every attribute per pair as a key ("eurusd:range:europe:high")? So essentially my drools session will have one fact, not counting the incoming quotes. I see on the list that this was a problem before the mvel updates but that was a while ago.</div>
<div><br></div><div>2. When an incoming quote might modify a value, what is the performance difference between using a rule to change the value or making the changes outside of the ksession and referencing the facthandler to modify? Is one method considered 'cleaner'?</div>
<div><br></div><div>Thanks,</div><div>Bobby</div><div><br></div>