...
These are only a very high level comparison of the characteristics, there are lots of alternative designs in both of these categories that lead to different characteristics.
Where is the data kept?
Memory | PostgreSQL | |
---|---|---|
Volatility | lost when the module instance is terminated | retained even if module instances are terminated |
Locality | local copies for each module instance | shared between module instances |
Access Control | shared needs to be controlled with code within the module | can be controlled using mechanisms provided by the database server |
Responsiveness | Likely faster if cached value is present, likely slower if not | Dependent upon network and database load |
Record Type Suitability | Better suited to smaller sets that change rarely, e.g. reference types | Can be used for any kind of record type |
Infrastructure needs | None | Requires a database for mod-circulation |
How is the copied data updated?
Periodic HTTP requests | Messages consumed from Kafka | |
---|---|---|
Freshness | Dependent upon frequency of periodic refresh. Likely to be lead to data being stale for longer than with messaging | Dependent upon message processing latency |
Access requirements | Needs a system user or module permissions granting to a timer endpoint | Needs access to Kafka topics for every record type (assuming record snapshot based messages as used with mod-search) |
Initial population / manual state refresh | Requires requests to fetch all records for for all cached records types | Either requires reprocessing of persistent topic (not currently allowed by FOLIO standards) or custom process (similar to mod-search re-index process) |
Load on other modules during synchronisation | Could be significant. Dependent upon number of record types and quantity of records | Potentially none with persistent topics (not currently allowed by FOLIO standards) |
Freshness measurement | ||
Combine the business logic and storage modules together
...
Intent | Endpoint | Destination Module | Sample Response Time (ms) | Sample Response Time of Token Check (ms) |
---|---|---|---|---|
Initial request | 99 | |||
Fetch user (making the request) | GET /users/{id} | mod-users | 6 | |
Fetch permissions | GET /perms/users?query=userId=={id} | mod-permissions | 16 | |
Generate downstream token | 12 | |||
Fetch user (patron) by barcode | GET /users?query=barcode=={barcodeuserBarcode} | mod-users | 13 | 86 |
Fetch manual blocks | GET /manualblocks?query=userId=={userId} | mod-feesfines | 133 | 7 |
Fetch automated blocks | GET /automated-patron-blocks/{userId} | mod-patron-blocks | 546* | 27 |
Fetch item by barcode | GET /item-storage/items?query=barcode=={barcodeitemBarcode} | mod-inventory-storage | 163** | 10 |
Fetch holdings | GET /holdings-storage/holdings/{id} | mod-inventory-storage | 57 | 9 |
Fetch instance | GET /instance-storage/instances/{id} | mod-inventory-storage | 22 | 7 |
Fetch location | GET /locations/{id} | mod-inventory-storage | 9 | 13 |
Fetch library | GET /location/units/libraries/{id} | mod-inventory-storage | 10 | 7 |
Fetch campus | GET /location/units/campuses/{id} | mod-inventory-storage | 10 | 7 |
Fetch institution | GET /location/units/institutions/{id} | mod-inventory-storage | 11 | 7 |
Fetch service point | GET /service-points/{id} | mod-inventory-storage | 9 | 8 |
Fetch material type | GET /material-types/{id} | mod-inventory-storage | 8 | 7 |
Fetch loan type | GET /loan-types/{id} | mod-inventory-storage | 22 | 8 |
Fetch existing loans | GET /loan-storage/loans?query=status.name=="Open" and itemId=={itemId} | mod-circulation-storage | 9 | 17 |
Fetch requests | GET /request-storage/requests?query=itemId=={itemId} and status==("Open - Not yet filled" or "Open - Awaiting pickup" or "Open - In transit" or "Open - Awaiting delivery") sortBy position/sort.ascending | mod-circulation-storage | 10 | 9 |
Fetch circulation rules | GET /circulation/rules | mod-circulation-storage | 18 | 18 |
Fetch loan policy | GET /loan-policy-storage/loan-policies/{id} | mod-circulation-storage | 10 | 8 |
Fetch tenant locale | GET /configurations/entries?query=module=="ORG" and configName=="localeSettings" | mod-configuration | 16 | 10 |
Fetch overdue fines policies | GET /overdue-fines-policies/{id} | mod-feesfines | 19 | 8 |
Fetch lost item fees policies | GET /lost-item-fees-policies/{id} | mod-feesfines | 11 | 10 |
Fetch opening days | GET /calendar/periods/7068e104-aa14-4f30-a8bf-71f71cc15e07/calculateopening?requestedDate={{dueDate}} | mod-calendar | 12 | 8 |
Fetch user (patron) groups | GET /groups?query=id=={groupId} | mod-users | 17 | 7 |
Update item status | PUT /item-storage/items/{id} | mod-inventory-storage | 194 | 13 |
Create loan | POST /loan-storage/loan | mod-circulation-storage | 16 | 8 |
Update patron action session | POST /patron-action-session-storage/patron-action-sessions | mod-circulation-storage | 10 | 7 |
Fetch user | GET /users/{id} | mod-users | 6 | 15 |
Fetch patron notice policy | GET /patron-notice-policy-storage/patron-notice-policies/1a821238-0cd9-48d9-a71a-057d33df0154 | mod-circulation-storage | 6 | 7 |
...