I have not yet determined how I want to implement my problem and was hoping to get some feedback.
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.
This includes range values (high, low, average) for multiple time periods, volatility information, bid/ask updates etc.
Currently I have classes associated for each, so say for range:
class Range {
double high;
double low;
double avg;
}
Range europe = new Range(); //european trading hours
Range us = new Range(); //us trading hours
Questions:
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.
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'?
Thanks,
Bobby