Recommendations for LCA
Some recommendation that you can consider for your LCA.
LCA Development
- Always use the latest major version of Reltio release for Reltio dependencies. For more information on latest releases, see topic Check out our new features and release schedule.
- Use LCAs only for simple operations. Complex operations must be developed outside of the LCA framework.
- Avoid invoking Reltio APIs from LCAs unless absolutely necessary. This could impact performance and can lead to infinite loops. Prevent cascading the LCA event from the LCA hook. While invoking a
POST/PUT/Delete
call from the LCA hook, use theexecuteLCA=false
parameter to prevent cascading of LCA. - LCAs must be implemented in a stateless manner.
- Use Data Validation Function (DVF)/Validation Service over LCA, if the business requirement is to only validate data but not to change the data.
- Always use AWS Lambda for LCA, for better scalability and maintenance.
- Use the appropriate LCA hooks as per the business requirement.
- Use proper debugging statements in the LCA Code. Otherwise, it may get really complex to debug an issue.
- While comparing the value of an attribute that is an RDM lookup, use the
lookupCode
property for comparison rather than thevalue
property. - Avoid any external calls within the LCA.
- For any Reltio API Calls or Auth Calls within Reltio, use the LCA provided
ReltioAPI
object. - Do not make Get token calls with in LCA as ReltioAPI object already holds the token and it uses this token for the API calls. So you don't need to pass the token explicitly.
- Before implementing an LCA, check if it can handle out-of-the-box functions like Cleanse, Sequence Generator, and so on.
- Implement LCAs using AWS Lambda functions. Lambda functions can be maintained and deployed by your own IT team without needing any involvement from Reltio Support to debug, maintain and deploy these LCAs. Native LCAs are discouraged for use and any new native LCAs will require exception approval from Reltio for deployment.Note: The LCA handler certification is applicable only for native LCAs. LCAs running in AWS Lambda don't need to undergo the certification process. You can directly deploy the Lambda LCAs without any manual review from Reltio.
LCA Dependencies
- Keep your LCA JAR files as small as possible so that it has a small memory footprint.
- Use the provided scope for dependencies that are available with the LCA Service (for example, LCA framework, log4j, and Jackson).
- Test the scope of dependencies that are used for test purposes only (for example, junit, jsonassert and so on).
Performance
- LCAs must be executed as quickly as possible (in most cases in a few milliseconds).
- Turn off the LCA by removing the hooks from the L3 configuration before performing a data load because it can impact performance.
- If LCAs have to make some changes only when the changed entity satisfies some condition (Conditional LCA), you must consider specifying this condition in the metadata configuration. This allows the API to execute the LCA only for those entities that satisfy this condition. Therefore, to improve performance, it is recommended to avoid unnecessary LCA executions.
- Use unique source names for each cleanser or LCA's crosswalk. This way, every cleanser and LCA can run independently without worrying about stomping on data. The crosswalks must all look like independent sources of data coming into the entity.
- There are many different hooks or events that can be used to trigger an LCA. The hook decides the behavior of the action. For example, a before save LCA makes necessary changes before the profile is saved to Reltio. Whereas, an after save LCA waits for the data to be saved and then scans the profile. When you develop an LCA, examine the use case to determine which hook is most appropriate.
- When there is a requirement to run some operation, after an event has occurred to the entity (for example, using the after hooks), consider consuming events from the queue instead. Consuming events from the queue allows data to be processed asynchronously. Whereas, all LCA hooks are executed synchronously and affect data load performance.