Monday, August 9, 2010

Reducing the size of dictionaries

I was working on a case study where I had to create close to 10 dictionaries, each of them having the same facts being passed to them. The XSD I was using was of a considerable size, say 27KB and the XML generated from it was 15KB. When the facts were created the dictionary size came to 1.3 MB. So since each of these dictionaries had facts imported in them, each was about 1.3 MB and so the entire .jar file post compiling was about 15 MB.

This was a simple 10 dictionaries in a project case. Consider 50-60 dictionaries and each of size 1 MB. The project would take about 20 minutes to deploy, considering my case study took 6 minutes to deploy. Maintenance becomes an issue here and SOA server after deployment becomes slow and unstable.

Alternative is, have the facts in one dictionary. Link this dictionary to all other dictionaries using the same facts and use the imported facts in rules. This reduces the size of the dictionaries considerably. Statistically, for my case study, the size of one of the dictionary (where facts were present) remained the same. The size of the others came down to 500KB (depends on decision table number, no.of rules etc) approx. The size of the entire deployable was halved.

Peace !

Cheers,
- AR

No comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License