Hello, I work for a software company that has a lot of business rules to process, these rules change very often and look something like a lot. They are datamapping rules that usually say something like, "this xml tag map's to this EDI field in memory." The rules are written in our own "Business Rule" language and were designed to look like VB. Our server that accepts XML orders from our clients and interprets these rules in order to process a transaction and put it in a form it needs to be to leave our back end. These rules are stored in a database currently and are read into memory when the order processing server starts up. As you can see these rules are not compiled and or, without a doubt, the slowest part of our transaction processing and very CPU intensive. Each order is taking almost 8 CPU seconds each. This is greatly hurting scalability to the point where we can only have about 1 server/thread per CPU. If you do the math that turns out to 7.5 orders/minute per CPU. We aren't going to scale very well at that rate. So I am exploring alternatives. Our current thoughts are to write our server and rules in either Java or Perl. In either case the rules will be able to be compiled or, in the case of Perl, "Professionally Interpreted," well say. Which we assume would be faster then our current home grown interpreter written in C++. My question is, does this seem like a good candidate for Jython? Is Jython thread safe? Would Jython give us what I think it would, a simple clear language to write business rules in, and a free, high quality interpreter to get them compiled and running quickly? I know that was a load of information, thank you for your time.
I have seen java apps define rule sets in Jython and thought it worked very well. I don't think the runtime speed between rhino and Jython is enough to matter, and I think either would work great. The ease of embedding the Jython interepreter makes this kind of work nice.