Posted by
Janko Mivšek on
Aug 12, 2011; 7:56pm
URL: https://forum.world.st/concurrency-tp3738918p3740338.html
Hi Paul, welcome to the mailing list!
S,
[hidden email] piše:
> Hello List and Janko Mivšek,
>
> thank you for making the framework available.
>
> How to deal with concurrency?
> Example: the adressbook from
http://www.aidaweb.si/tutorial> Many user can start editing the same dataset without information the dataset is already in use. And without a kind of recordlocking.
>
> Are there "helpermethods" in the framework? (and if so, which?)
> Any pointer where I should read up on the topic.
If you load Scribo as well, there is a locking support in class
Document, implemented in subclases WikiPage and presentation class
WikiPageApp.
In short: when page is edited, an Ajax polling in background keeps
server informing that this page is editing. If someone else try to edit
it, a warning is shown with a name of the editor. By Ajax polling again
this warning disappears when original editor finish editing.
Here are classes and methods to look at:
Document category 'locking':
aidaIsLockedOn: aSession,
aidaLockOn: aSession,
aidaUnlock, ...
WikiPageApp category 'access rights':
setLock
regrantLock
isLockedBySomeoneElse
WikiPageApp
viewEdit "to see how it is used"
lockElement "to refresh document lock periodically"
viewWait "to wait until page is unlocked"
You can load Scribo simply by this script:
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfScribo';
load.
(Smalltalk at: #ConfigurationOfScribo) load.
Hope this helps
Janko
--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida