...
Pub-sub between mod-users and mod-kb-ebsco-java | Bulk api for users in mod-users | ||
---|---|---|---|
Query data every time it's needed | implement scheduler to periodically update assigned users data | ||
Advantages | Most preferable way for data consistency achievement. Good performance for UX. | No need to store duplicate data and worry for data consistency. | Ensures data consistency. Good performance for UX. |
Disadvantages | Will cause a lot of "dummy" network traffic and unnecessary component load because kb-ebsco needs info only about certain users not all. | Worst user-experience cause we need query data from multiple sources to display assigned users info so this will cause delays for data displaying. | Wasted processor time in most cases and delays in data consistency depending on scheduler rate. Also unnecessary api calls in cases data is already consistent. Potentially can cause big performance issues as database grows. |
Developers effort to implement | Almost no changes to current code. Add producer on | Rework database structure in Implement bulk api in Add bulk api call to | Implement bulk api in Add bulk api call to |
Conclusion:
Pub-sub looks like the most acceptable way to achieve data consistency for users assigned to kb credentials in It was decided to remove user data from mod-kb-ebsco .Also it was discussed that it not necessary to display patron group for assigned users so we can simplify user assignment by removing Patron group
.and query user-related info every time it is needed. Bulk api is not needed because users can be queried using cql.
To be implemented:
Note | Work to be done | Side | Story |
---|---|---|---|
Do anytime | Remove call to "/groups" api (i suppose it's even not used now) Note: actually this is not a part of this spike, just wonder whether this api call is dummy. If so - it should be removed, but spike can be completed without this. | front-end | |
Do first | Rework "GET /kb-credentials/{kb-credentials-id}/users" api:
| back-end/mod-kb-ebsco | |
Do together | Update "POST /eholdings/kb-credentials/{kb-credentials-id}/users":
| back-end/mod-kb-ebsco | |
Update call to "POST /eholdings/kb-credentials/{kb-credentials-id}/users":
| front-end | ||
Do last | Schema updates:
Code updates:
| back-end/mod-kb-ebsco |