2008/11/22 Chris Muller asqueaker@gmail.com:
Thanks for the report Göran. Good debugging, another option would be to employ a ReadStrategy to ensure the UUID is dereferenced in the original server call.
This never came up because serverPerform: was added solely for this purpose (sequence # generators), and a proxy would never be part of any of the other requests. Still, you've piqued my curiousity whether Magma could make this invisible for you.
I think its quite possible, since you anyways need to serialize requests to server - if you discover a proxy, you can reify it , or maybe just serialize its ID without need in reifying it on client side, which is much faster.
Regards, Chris
On Tue, Nov 18, 2008 at 4:26 PM, Göran Krampe goran@krampe.se wrote:
Hi!
As Chris knows we need sequence numbers in Gjallar. Chris implemented #serverPerform:withArguments: but I admit being slightly stumped with it.
I think the idea is that you add methods to MagmaRepositoryController like for example:
q2CounterInitialize: anId | sess counter | counter := 0. sess := self session. sess cacheAt: anId put: counter. ^sess commit: [ sess root environment at: anId put: counter ]
q2CounterNext: anId | sess | sess := self session. ^sess commit: [ sess root environment at: anId put: (sess root environment at: anId) + 1]
q2CounterValue: anId | sess | sess := self session. ^sess commit: [ sess root environment at: anId ]
...and then we call them, right? Soo... today I ended up getting errors about serialization:
"MaMalformedRequestError: No createProxyBlock specified. See MaObjectSerializer>>toCreateProxies:"
Aha... I think I realized this now - the id above is a UUID but we are sending a MaMutatingProxy instead. So I added just a little call like "{id yourself}" to make sure it gets faulted - and then it seems to work.
regards, Göran
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma