Sequence numbering problem... solved.

Chris Muller asqueaker at gmail.com
Fri Nov 21 23:21:32 UTC 2008


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.

Regards,
  Chris

On Tue, Nov 18, 2008 at 4:26 PM, Göran Krampe <goran at 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 at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list