I am wondering,
Is it safe -- in the long term -- to close Squeak without closing first the connexion to the server. Will it left open stuff in the remote Magma server?
I am using a Magma client in a Squeak plugin, and the user can close the Squeak plugin at any time (closing the browser, move to another html page)
Hilaire
If, by "closing Squeak", you mean an ungraceful termination via the OS-Window exit or termination of the process:
- Session resources remain in the server image until enough commits by other sessions exceeds a threshold whereby the stale session resources are reclaimed. - All uncommitted changes in the image are lost, of course. - The image restarts in its previous state.
If, by "closing Squeak", you mean gracefully using the World menu, "quit" without saving:
- Since open transactions must be aborted. A (resumable) warning is signaled if any session has an open transaction. - The session resources are cleaned up on the server. - Uncommitted object changes are persisted in the image file, of course.
If, by "closing Squeak" you mean using the World menu to "save and quit", the following additions apply to the above:
- While the image is sleeping on disk, many updates committed to the persistent model are by other sessions are possible. - The image is restarted in its previous state, persistent objects are throughout the image. The existing MagmaSession instances are still aware of those persistent objects, so it is able to establish a new connection. - But the image state could be way behind the current state of the repository. - Therefore, beginning in release 41, the reconnection process also includes a "super refresh", where every cached object is brought up to date from the server. This can add some time to the image startup since, if a lot of objects are behind, their updates must be downloaded. - All sessions which were connected when the image was saved will startup in this way.
Regards, Chris - Show quoted text -
It is my scenario ungraceful termination. But anyway the SqueakPlugin configuration is only used to review (load) object from the database, not commit. So if I understand, it is pretty safe for the server?
Hilaire
Le lundi 03 mars 2008 à 21:18 -0500, Chris Muller a écrit :
If, by "closing Squeak", you mean an ungraceful termination via the OS-Window exit or termination of the process:
- Session resources remain in the server image until enough commits
by other sessions exceeds a threshold whereby the stale session resources are reclaimed.
- All uncommitted changes in the image are lost, of course.
- The image restarts in its previous state.
So if I understand, it is pretty safe for the server?
The existing functionality should be safe for you, but you should test it with your application. Actually, if you're going to do that you could probably more easily implement the generic test case method on MagmaTestCase.
There is no test case for it but there should be. I'll try to squeeze it into r41, or if you crank out a test method for it (i.e., implement #testSessionReclaimation on MagmaTestCase), it would be a great addition to r41. Until a "real" security framework is integrated "to the core" into Magma, it is prudent to at least close any wide-open doors to server-oblivion, if we find any.
the SqueakPlugin configuration is only used to review (load) object from the database, not commit.
I really need to do a "read-only" session, which can read faster but not commit. I think its possible. Another thing to add to my list..
Regards, Chris
On Tue, Mar 4, 2008 at 4:33 AM, Hilaire Fernandes hilaire@ofset.org wrote:
It is my scenario ungraceful termination. But anyway the SqueakPlugin configuration is only used to review (load) object from the database, not commit. So if I understand, it is pretty safe for the server?
Hilaire
Le lundi 03 mars 2008 à 21:18 -0500, Chris Muller a écrit :
If, by "closing Squeak", you mean an ungraceful termination via the OS-Window exit or termination of the process:
- Session resources remain in the server image until enough commits
by other sessions exceeds a threshold whereby the stale session resources are reclaimed.
- All uncommitted changes in the image are lost, of course.
- The image restarts in its previous state.
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
magma@lists.squeakfoundation.org