Record Locking

PASI uses a technique called “Optimistic Locking” to manage locking of records during updates. Optimistic Locking assumes that it will be very rare that two PASI Clients will be updating the same record at the same time. Therefore, PASI Client’s should never receive an error indicating that a record was locked.

Instead, the PASI Core imposes a system of version control that must be adhered to. This version control system ensures that when an update to data is performed, it is performed against the most recent version of the information.

This means that before a PASI Client can update information about any of these objects, they must first be synchronized with the PASI Core. For example, before a PASI Client can update a student’s mailing address, that student record in the PASI Client must be in-sync with the PASI Core.

The PASI Core doesn’t track which PASI Clients are in-sync. Instead, every time a PASI Client requests to update a record, the PASI Client must confirm their synchronization status with the PASI Core. This is done by providing a version number known as the PASI Core Version every time the PASI Client requests to perform an update.

To continue the example, as part of the request to update a student’s mailing address, the PASI Client must indicate the last known PASI Core Version of the student record. When the PASI Core processes the request, the PASI Core compares the version submitted on the request with the current PASI Core Version for the same student record tracked within the PASI Core. If the two versions are the same, the request will be processed. If the two versions are different, the request will fail based on Rule 3004 - PASI Core Version Mismatch.

It is important for PASI Client’s to track the PASI Core Version for each record they expect to be updating.