Relation Cache Updater
Last updated
Last updated
'relation-cache-updater' job is used to perform one time compute and cache information such as leafNodes, optionalNodes, unitsMap and ancestorsMap of a collection to Redis when the collection is published. This data is utilised by other jobs and services.
Key | Data format | Sample |
---|---|---|
<collectionId>:leafnodes | List<String> | collectionId:leafnodes: [“resource1”,”resource2”] |
<collectionId>:optionalnodes | List<String> | collectionId:optionalnodes: [“resource1”,”resource2”] |
<rootCollectionId>:<resourceId>:ancestors | List<String> | collectionId:resource1:ancestors: [“courseunit1”, “democourse”] |
Configuration variables:
Variable | Default Value | Purpose |
---|---|---|
kafka.input.topic | {{env}}.lms.user.account.merge | Kafka topic from which messages/events are read to be processed. |
kafka.groupId | {{env}}-relation-cache-updater-group | Kafka input topic group Id |
lms-cassandra.keyspace | {{env}}_hierarchy_store | Cassandra keyspace name |
lms-cassandra.table | content_hierarchy | Cassandra table used to read collection hierarchy. |
redis.database.index | 10 | Redis index to which computed data like leafnodes and optionalnodes is stored |
dp-redis.host | IP should be same as lp-redis host | dp-redis (data-pipeline redis) IP should be kept same as lp-redis (learning-platform) redis in order to be able to read pulished collection information |
dp-redis.port | port should be same as lp-redis port | dp-redis port |
dp-redis.database.index | 5 | Redis index to which computed data 'units map' is stored |
Sample event:
Source code: