[Glass] how to update models properly

Richard Sargent via Glass glass at lists.gemtalksystems.com
Wed Oct 29 09:40:29 PDT 2014

Hi Sebastian,

If you replicate state between different memory spaces, you have the same
kind of issues to deal with that GBS faces. There *are* a lot of
complexities in the general case.

Ultimately, when you send the revised state back to the server, you need to
ensure you update the existing server object with the replicated data. The
Object database model is very different from the Relational database model
(which has an essential indirection built-in).

It may be worth considering executing behaviours in the server against the
object (and then replicating the new state back to the client).

On Wed, Oct 29, 2014 at 9:23 AM, Sebastian Heidbrink via Glass <
glass at lists.gemtalksystems.com> wrote:

> Hi all,
> I spent quite some time to get used to Gemstone now . Somehow I stumble
> across some questions and insecurities again and again.
> I wonder if somebody can give me some hints on this.
> I use Gemstone/Web without Seaside but with a ZincREST interface. Some of
> my data model objects a transfered via JSON or CSV betwenn db and client.
> Everytime the client wants to modify data on the server he sends a JSON
> representation of the object to the server and the server parses the json
> and creates a data model object from it.
> Now I do have a persited version of my model object and the just newly
> created model object within the DB.
> How would I update now? I can't replace the persisted object by the new
> one, because I might loose references to/from it... I will need to walk
> through all attributes compare them and replace just different ones?!
> I feel like the whole approache is wrong and slow, isn't it? Wouldn't it
> be better to just parse the request's json into a JSONObject and do the
> synching after I located the persisted Object based on some hash values or
> id provided?
> How do your strategies look like? I currently feel like producing too many
> temporary and unneeded objects.
> Creade, Delete and Replace do not really provide such "imagination" issues
> like the Update... do they?
> Any push into the right direction is highly appreciated!
> Thanks and have fun at FAST if you'll be there!
> Sebastian
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20141029/1d2bfd14/attachment.html>

More information about the Glass mailing list