Yes I have read the whole wiki several times I think, thanks for writing it. Magma would be virtually useless without it. I think I&#39;ll go with staying in a transaction all the time and see where it gets me.<div><br><br>
<div class="gmail_quote">On 20 December 2011 03:11, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Milan, I don&#39;t know if you saw this one too,<br>
<br>
    <a href="http://wiki.squeak.org/squeak/5605" target="_blank">http://wiki.squeak.org/squeak/5605</a><br>
<br>
which mentions staying in a transaction all the time as one of a few<br>
possible-strategies for committing.<br>
<br>
It used to be (a long time ago) that long transactions were a<br>
challenge due to getting disconnected from the server whenever there<br>
was too much commit-activity (by the other clients) accumulated<br>
against against the session.  The accumulated changes are cached in<br>
memory on the server so unresponsive sessions must eventually be<br>
trimmed.<br>
<br>
But that could be frustrating for the client because, sometimes the<br>
user just had to do a _lot_ of work, and so it was all the worse to<br>
not be able to commit that work.  The solution was to make<br>
transactions be able to span session connections.  Now transactions<br>
can be weeks long, if desired.<br>
<br>
If a session disconnects with a transaction open (e.g., save and exit<br>
the image -- time to board the plane), the image can be restarted and<br>
work inside the transaction resumed later.  When the session is<br>
reconnected, the users work is all still there in the image, but any<br>
other objects which were changed in the meantime must be refreshed to<br>
their current state -- so it&#39;s necessary to review.  BTW, this the<br>
reason there can sometimes be a pause after reconnecting a<br>
long-disconnected session (the refresh), but its precisely what the<br>
system should do -- preserve the persistent state of my saved image<br>
and let me commit it later, when I&#39;m good and done.<br>
<br>
So, leaving a transaction open is now a totally viable option and can<br>
be a fine way to go, depending on the application.<br>
<span class="HOEnZb"><font color="#888888"><br>
 - Chris<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, Dec 19, 2011 at 12:55 PM, Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt; wrote:<br>
&gt; In magma, #begin performs an implicit #refresh, not an implicit #abort.<br>
&gt;<br>
&gt; See:<br>
&gt;<br>
&gt;  <a href="http://wiki.squeak.org/squeak/2636" target="_blank">http://wiki.squeak.org/squeak/2636</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Dec 19, 2011 at 11:00 AM, Milan Mimica &lt;<a href="mailto:milan.mimica@gmail.com">milan.mimica@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I have spent some time trying to use Magma properly, hoping that some things<br>
&gt;&gt; that weren&#39;t clear at the beginning will eventually come clear. But one<br>
&gt;&gt; thing I still don&#39;t get: transactions. I understand transaction semantics in<br>
&gt;&gt; RDMS, but what does it mean in magma?<br>
&gt;&gt;<br>
&gt;&gt; What is the difference between modifying an object inside and outside<br>
&gt;&gt; transaction? This two code snippets don&#39;t show any difference.<br>
&gt;&gt;<br>
&gt;&gt; session := ...<br>
&gt;&gt; model := session root model.<br>
&gt;&gt; model firstName: &#39;foo&#39;.<br>
&gt;&gt; session begin.<br>
&gt;&gt; model lastName: &#39;bar&#39;.<br>
&gt;&gt; session commit.<br>
&gt;&gt;<br>
&gt;&gt; session := ...<br>
&gt;&gt; model := session root model.<br>
&gt;&gt; session begin.<br>
&gt;&gt; model firstName: &#39;foo&#39;.<br>
&gt;&gt; model lastName: &#39;bar&#39;.<br>
&gt;&gt; session commit.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; They both commit both firstName and lastName properties, so I don&#39;t see any<br>
&gt;&gt; use of opening and ending a transaction. Couldn&#39;t there just be a commit<br>
&gt;&gt; message, so that you are always in a transaction, as that is how it<br>
&gt;&gt; apparently works?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Milan Mimica<br>
&gt;&gt; <a href="http://sparklet.sf.net" target="_blank">http://sparklet.sf.net</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Magma mailing list<br>
&gt;&gt; <a href="mailto:Magma@lists.squeakfoundation.org">Magma@lists.squeakfoundation.org</a><br>
&gt;&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/magma" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/magma</a><br>
&gt;&gt;<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Milan Mimica<br><a href="http://sparklet.sf.net">http://sparklet.sf.net</a><br>
</div>