change if let to new if let format if we are already using rust 1.65.0
Refactor the Configuration so that A CulturalContext have thresholds only in the dimensions of its target ResourceType. In other words, we should make sure that the dimension_eh in the threshold are found in the dimension_eh of the ResourceDef
the base_type in the ResourceType should be changed from AppEntryType to an Enum containing AgentPubKey, AppEntryType, and External Resource
The subject EH is EntryHash right now in Assessment. Change it to AnyLinkableHash so that we can use resources outside of Holochain.
Have the run method use DataSet as an input, and when you do a live run method
get assessment for resource is a heavy operation since it is using a for loop to do get links. That could time out if we have many agnets using the same SM. We could separate the function to get assemsent for dimension and call them from the get asssesment for resources
We could have a snapshot for subjective assessments to minimize get links.
we can have run_live_method where we get links to build the data set. And we can also have a non live run_method where we compute using the existing DataSet.
Method program: sum u32 could overflow. Change it so it wont.
Multiple thresholds for the same dimension? Not for v1, maybe not at all. Use a ThresholdKind that allows more than one value like BetweenValues(0,10)
We have to recheck all the paths and make sure that we are not creating hot spots. One example Damien gave is in assessment_typed_path where all resources are linked from a single path. Maybe we can separate them per resource type or even per provider DNA.
For data_points, the DataSet should store only the Vec not a Vec of the assessments
DataSet can have a link to the “dimension”, to make sure the DataSet is for the correct Dimension
New DataSet { subject: AnyLinkableHash, assements_values: BTreeMap<Etnryhash, value>, dimension: EntryHash, from: DnaHash // this can be in the resourceType}
Use cell clones and DNA origin_time to calculate only based on the periodic (like month) data, so kind of “archive” old datasets to avoid get_links issues
Validation
make sure that the Dimension in order_by in CulturalContext exist in one of the threshold
all input dimensions in cultural context subjective
Threshold: make sure the calculation of Threshold is always for the same dimension. This Should be checked in the validation for CulturalContext.
Validations of assessments
value in the assessment should be within the dimension used
one assessment per resource per agent per dimension. If the same agent is creating the assessment, it should be an update not a create.
What happens if some of the subjective assessments used in the method got updated? Should we update the old objective assessment or should we create a new objective assessment?
If you can compute live, you will do the get links and spit out the result based on the input you get. If can compute live is true, anyone can call the run method.
If it is false, only the Community Activator can calculate it
Validation
Validations of assessments
value in the assessment should be within the dimension used
one assessment per resource per agent per dimension. If the same agent is creating the assessment, it should be an update not a create.
What happens if some of the subjective assessments used in the method got updated? Should we update the old objective assessment or should we create a new objective assessment?
If you can compute live, you will do the get links and spit out the result based on the input you get. If can compute live is true, anyone can call the run method. If it is false, only the Community Activator can calculate it