RE: [Madeleine-devel] Before the release of 0.7
Status: Beta
Brought to you by:
ndrs
From: Stephen S. <ste...@ma...> - 2004-07-04 21:40:30
|
Hi, Firstly, I added SOAP support to the automatic module. Pass = SOAP::Marshal as the marshaller. It works, but, like yaml, SOAP has problems with marshalling certain data. On a large instiki I get errors like: undefined method `extraattr' for nil:NilClass /usr/local/lib/ruby/1.9/soap/mapping/rubytypeFactory.rb:47:in `obj2soap' No idea what it means, but I will try to track it down if I have time. Also, you can't pass soap as the marshaller to ZMarshal, because soap refuses to read from a GzipReader. Regarding Ruby version: I think 1.8.1 would probably be appropriate. = Indeed there are known problems with YAML (and SOAP) as supplied with that = version. On the other hand, there are still problems with 1.8.2 and 1.9.0. So I would require 1.8.1, and warn users about using yaml or soap with large objects, or self-referential object trees. I wonder do we wait for a couple of weeks for 1.9.0, which may include a fixed yaml? Now, on another topic: I have been thinking about how to implement things so that a different marshaller could be used for commands. And I've come up with a = solution. It's in the cvs branch AUTOMATIC_EXPERIMENTAL. The way it works is to change the proxy objects so that they don't = actually contain the object that is being proxied any longer. Instead, all the user objects are held in an array. When a snapshot is taken, it is this array that is marshalled, together with a couple of = other bits of meta data. When commands are serialised, any proxy objects that are in the command = are just sent out as normal - but because they don't contain the actual user object there is no problem with creating two of the same object on = restore. The code is simpler, shorter (by 40 lines out of 230 or so) and clearer. The ugly custom marshalling code is gone, although we still need to = provide a separate wrapped marshaller for snapshots. However... there are a couple of things that might not be liked. 1. Not backwards compatible snapshot (or command) format. An update program is feasible though, I suspect we would need to provide this. 2. User objects are held in a flat array. You may not be able to look = in the snapshot (if it were yaml) and easily see which object relates to = which other object if you have many intercepted objects. In something like instiki this is not a problem because the whole thing is only one object = as far as AutomaticSnapshotMadeleine is concerned. Other than that, I like this version rather better than the old one. Stephen. |