In java , when we compile the code we get the class file which we can run in any environment , so the class file generation is only once.
How is the compilation done in case of pega , and how is it related to rule resolution ex. When pega looks for an activity in the cache and when it founds it there ,does it compile the code or is the compiled code in there in cache and similarly when the rule is not found in cache it builds the cache , so at what time the compilation happen?
***Updated by moderator: Lochan to add Categories***
Many of the PRPC rule types are executed at run-time as java classes and methods. PRPC ‘assembles’
executable java as needed by generating and compiling java, then storing the class files back into the
database table named pr_assembledclasses. When the same rule is accessed again, it reads from this
database table until the rule changes.
The run-time PRPC environment includes ‘engine’ and ‘application’ classes. The core PRPC engine is
implemented through Java classes. Starting with PRPC v6.1, most of the PRPC ‘engine’ is actually
loaded from the database table named pr_engineclasses. Storing the engine in the database provides
the ability to apply engine maintenance without redeploying any files on the application servers.
PRPC utilizes custom Java class loaders. The custom loaders enable PRPC-based applications to be
changed in a live system without having an outage or the need to redeploy. PRPC applications are
typically hosted inside an application server and accessed by human users via browsers or by partner
applications such as a service. PRPC facilities can also be directly embedded in Java applications (JSR-
94 API). Selected PRPC features and facilities may run from command-line java scripts that are
distributed with PRPC.
For More details you can read Architecture details from PDN.