Improving performance with parallel rating
Policies in certain lines of business have large numbers of coverables and generating quotes can take a noticeable amount of time. Parallel rating can reduce the time for generating quotes on these policies by rating coverables using multiple threads. In the base configuration, parallel rating is implemented in the commercial property line of business.
You can use commercial property as an example for implementing parallel rating in other lines of business. Consider parallel rating for lines of business with policies that typically include a large number of coverables that do not share data.
Parallel rating works with other features of PolicyCenter, including asynchronous quoting and impact testing.
Commercial property rates the Location coverable in parallel. When parallel
rating is enabled, any commercial property policy can be rated in parallel. Through
configuration, you can specify the conditions required for rating a policy in parallel.
See also
Parallel rating using entities
In the base configuration, parallel rating using entities is enabled by default for the commercial property line of business. Rate routines and code executed in parallel must be thread-safe. Enabling this type of parallel rating does not require changes to existing rate tables and parameter sets.
In the base configuration, the commercial property rate books, rate routines, and parameter sets in the small sample data set are compatible with parallel rating using entities.
Parallel rating using DTOs
- DTOs lower the overhead related to bundle management, which occurs when accessing entities
- Read-only DTOs are inherently thread-safe
However, this type of rating is more complicated to implement. Enabling this type of parallel rating requires that rate tables, rate routines, and parameter sets access DTOs instead of entities. If you have entity-based rate tables, rate routines, and parameter sets, you must create DTO versions of these. This type of rating also requires that you create code for the DTOs that replace the entities in rating.
Sample data for parallel rating using DTOs
When parallel rating using DTOs is enabled, the small sample data set includes rate books,
rate routines, and parameter sets for DTO rating of the commercial property line. These
include DTO in their name or dto in their code. For
example the sample data includes the CP RTM Demo Rating DTO rate book
and the BaseRate rate table definition with the code
cp_coverage_base_rate_dto.
In Studio, the code that creates the sample data is in the gw.rating.flow.scenario.CPDTORateflowScenario class. This class creates the set of rate books and rate routines that uses DTO objects rather than entities in calculations and parameters. These rate books and rate routines provide the same functionality as the sample data for commercial property rating that does not use DTOs.
