[aida] Aida and Magma

Janko Mivšek janko.mivsek at eranova.si
Sun Sep 28 16:05:31 CEST 2008


Hi Rob,

Rob Rothwell wrote:
> For a data entry application with Magma, you can simply create a session 
> and #begin it, if you are willing to #commitAndBegin regularly when you 
> change things, or #abort; #begin if you need to check for changes.
> 
> In an Aida application, you could easily #abort and #begin at the top of 
> every view method, and #commitAndBegin with all your action methods, but 
> since Aida is already providing "persistency" with the domain model, it 
> seems like you could pretty easily create a special "Magma Aware" Aida 
> by adding some well placed commits, aborts, and begins in the right 
> places within Aida and creating a "magmaSession" property for your 
> application.
> 
> Would it be hard to hook into the Aida code that reads and writes the 
> domain model to provide such behavior?

This is actually done that way in Gemstone GLASS port of Aida. 
Essentially you have a commit after every request, then a new 
transaction auto begins. But for performance (and solving the problem of 
parallel requests) Aida has its own WebTransactionMonitor, which 
coordinates transactions among parallel requests. Actually there is only 
one transaction context open at any moment and where we just 
coordinating commits. By default simply by committing when there is a 
time or at least every 10s. But an app can request an explicit commit to 
be sure data is really saved to the database.

I could say that an existing WebTransactionMonitor can probably easily 
be adapted for Magma as well, so if someone has a time ...

Janko


-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list