I have just posted r41Gamma1 Monticello Configuration to the "MagmaTester" project of SqueakSource. I have been very busy since the last r41Beta11 was posted.
I have made significant updates for this new version, including some changes you will want to be aware of for potential changes to your application. Here is a summary of the changes:
More Robust ======== - New #testMisbehavingSession ensures server correctly deallocates sessions when their challengingEntries exceeds the specified limit. - Independent Magma servers (not clients) have always operated with a relatively low memory footprint, but nevertheless now monitor memory utilization relative to capacity of the VM it's running in. "Capacity" is determined by parsing the '-memory' option passed to the vm in the command-line, or 450MB if no command-line option was specified. If memory utilization exceeds capacity, the oldest session is purged to make room.
Better support for headless operation ====================== - Looks for either of 'display=none' or '-headless' in the command-line arguments to determine whether running headless. - No MaWarning will open a debugger when the image was launched with a headless option. Any signaled MaWarning will be resumed automatically (#defaultAction). - An extra-safe headless guard; if user forgets to connect a session in a headless client, connect as 'unnamed' for them.
New Semantics ========== - When a session is in a transaction for too long, the server must eventually clean up in-memory resources associated that session. Up until this r41Gamma1 update, if the client was not truly "dead" but instead just taking a long time to commit, a MagmaSessionLost would have been signaled when the session finally did commit. At that point, to avoid losing the work, the client would then have to reconnect, send #begin again (which would update their image with other sessions changes), followed by #commit. Now this "recovery" scenario is performed automatically. Lost sessions are automatically reconnected, including reestablishment of the transaction! Local-only changes are untouched but other parts changed by others are brought up to date on the reconnection, invisibly to the client. - The nice side-effect of this is transactions can also span *deliberate* session reconnections, including even when an image saves and exits, then resumes later, the transactions is automatically "restored". Again, noting of course, that the persistent model is "rolled forward" on the reconnection. - At last, refreshPersistentObjectsEvenWhenChangedOnlyByMe preference has been removed. When crossing a transaction boundary, "updates" by other sessions are always merged into the local persistent model. But this option has always addressed whether Magma should revert *local-only* changes for begin, abort and commit-conflict that were not changed by other sessions. Now, it operates as follows:
abort - always update, always revert. begin - always update, never revert. commit (conflict) - always update, never revert. commit (successful) - always update (nothing to revert)
This is much less awkward than the old boolean preference.
- Finally removed the experimental MagmaOfflineObject and associated 'offlineResults' from MagmaForwardingProxy.
Several enhancements to the "Ma Client Server" framework ==================================== 1) A new abstract superclass for all requests MaClientServerRequest now knows its #lifecycle attributes and #clientConnection, providing network-layer access to the application-server program. Useful for the application to deallocate socket connection resources after a timeout period of inactivity. (Obviously, this was instrumental in the resource reclaimation associated with old purged sessions in Magma). 2) Removed MaNetworkError, now just using NetworkError. 3) Moved "Ma Client Server"-level statistics to Ma client server package; to the MaRequestServerConsole superclass of the MagmaServerConsole so "Ma Client Server" applications independent of Magma will have the informative statistics available to them for "free." 4) Added a "idleTimeHistory" to MaServerStatistics. This represents the time elapsed between requests, useful for interpreting server-load.
Miscellenaous Improvements ================= - Converted MagmaSession class>>'ConnectedSessions' to a SortedCollection for rendering in the console UI. - Now including the MagmaClientConnection in the commit log, so there is not only a time-stamp record but also "who". - Added ability to check, from the client, whether a MagmaCollection is locked (due to index being built), and what session has it locked. See MagmaSession>>#isLocked and #locker. - Renamed Object>>#session to Object>>#magmaSession. It is too inconsiderate to consume such a generic api. - Now using lighter-weight Mutex instead of Monitor for critical code sections.
Fixes ==== - Fix for accessing ForwardingProxy whose session has been disconnected. - Several bug fixes!
Cheers! Chris
PS - The exact packages:
Ma exception handling-cmm.30 Ma base additions-cmm.109 Ma proxy support-cmm.34 Ma traverse object graphs-cmm.24 MaFixedWidthReport-cmm.4 Ma Statistics-cmm.10 Ma object serialization-cmm.180 Collections-BTree-lr.68 Ma special collections-cmm.92 Ma client server-cmm.163 WriteBarrier-pmm.26 Magma client-cmm.324 Magma server-cmm.283 Ma Armored Code-cmm.123 Ma Squeak domain-cmm.5 Ma special collections tester-cmm.11 Ma object serialization tester-cmm.17 Magma tester-cmm.291
magma@lists.squeakfoundation.org