STILL WIP
Expand | ||
---|---|---|
| ||
Problems:
• Hypothesis: It would all be much simpler if we were copying all programme memberships separately
Principals:
Solutions:
Three ways of caching data, the first might not be viable because of connection specific info:
|
...
The approach of “pre-sorting” the data was also fine before as the exact same code was used for CDC and the ES Resync job. However, in order to repeat the massive time saving we achieved in
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Summary
Having multiple indexes makes GET requests simpler
performance has been raised as a potential benefit, but when more complex queries on large data sets take less than a second it’s questionable how much benefit this would really give.
Multiple indexes means duplicating data
Multiple indexes makes requires multiple updates for a single data change
Because we have separate CDC and Resync processes, and because the Java approach is prohibitively slow for the Resync process, we would have to write and maintain the business logic in separate places in separate languages
Tasks to complete TIS21-3774 with this approach
...
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
For this approach, in the ES Resync Job we remove the “pre-sorting” step featured in the current approach and just perform a straightforward 1:1 copy (excluding schema discussion for now) from masterdoctorindex to a single connectionIndex, in the same way we do things for recommendationindex,
We also remove the “pre-sorting” from the CDC process and once again do the same as in recommendations - a simple 1:1 update.
Instead of “pre-sorting”, we now implemented the business logic as part of an Elasticsearch query on the GET side of things.
This should be a fairly straightforward conversion, for example where we currently pre-sort with Java if(<conditions for discrepancy>)
we would instead GET with a Where <fieldValue> = <condition for discrepancy>
in Elasticsearch.
Tasks to complete TIS21-3774 with this approach
...