<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2">Olivier,<br><br></font>>As i understand the spec, there's two phases,<br>>one to lock (LockFeature), one another (Transaction) to apply transaction(s)<br>>And you could should to release Lock at the end of a/the Transaction,<br>>or wait till the end of the time limit.<br><br>Before the start of the transaction, you must call EnableLongTransactions() to create the required autorization table, then call CheckAuth() to create the trigger on the specified table and finally call for LockRow to lock row by row. Later, the transaction begins and the first thing to do is call AddAuth() to lock the table just
within transaction, once COMMIT or ROLLBACK is issued, the changes made by AddAuth are removed automaitcally.. Later you have to call UnlockRows to release all the locks in one step, and call DisableLongTransactions to drop all the triggers that was created.<br><br>>So operation must fails if:<br>>- LockFeature is requested with LOCKACTION=ALL and not able<br>> to lock alls.<br><br>Ok, that's what I thought. What if TinyOWS could add to the transaction summary those features that couldn't be affected ?<br><br>>- Transaction is requested on an already locked feature.<br><br>Mmmmm ... what about some SLEEP function to wait for the feature availability ? This reduces the communication payload.<br><br>>The WFS way to do it, is to handle feature by feature,<br>>so row by row for the undelying spatial database seems fine.<br>>Lock by table, is indeed only a (very) specific use case.<br><br>Agree, locking a table is not so efficient
(but easiest to implement ;))<br><br>>Some others thoughts,<br>>- DefaultLockExpiry should be set by default to a reasonable small value<br><br>When you call for AddAuth, you can specify a time limit. PostGIS default is 1 hour (to much for me) so I'm thinking to set it (maximum) 10 minutes. However, this must be configurable at tinyows.xml or tinyows.map.<br><br>>- A boolean should be set in the config file to activate yes or no,<br>
>the lock support<br>
<br>Ok, yes by default ?<br><br>>- What about a way to release one/all locks from administrator point of view ?<br><br>You can always call UnlockRows to remove the locks, so we can set this in a function to be able to be called by the transaction process or by an administrator.<br><br>>Could you write an RFC to describe the main implementation points ?<br>>(will be needed at a moment to pass through PSC validation)<br><br>I never have wrote a RFC before, but I can do it (I will check for some example)<br><br><span style="font-weight: bold; color: rgb(0, 96, 191);">IC Carlos Ruiz</span><br></div></div></div></body></html>