pier and SandstoneDB persistence

Esteban Lorenzano estebanlm at gmail.com
Fri Nov 28 14:17:12 MET 2008


Hi list,
I have a doubt about how to solve a problem in a system I'm doing, I'll 
start explaining the context:
The application is Pier based, but it is not a CMS (well, at least not 
just a CMS), it adds functionality bu extending pier components and 
commands.
There are some added data that should be persisted to file, in order to 
be able to rebuild the image and has backups and so on...
And for consistency (and in a paranioc way, but needed because we are 
keeping money ammounts, etc.) we are also persisting commans executed 
by users, and then we are capable to rebuild the user account if 
something happens.
For both persistency issues we are using SandstoneDB.

Well, the problem is when I want to persist pier commands (not those 
created by us, but previous ones)... many has class references and 
Sandstone tries to persist them too (and then SystemDictionary, and 
then hangs).
My approach to solve this problem is adding a couple of methods to 
PRCommand #toSandstone and #fromSandstone who changes class references 
for symbols and viceversa.
But now I have other problem: not all the commands are so easy to solve 
:) For example, those related to PRChangeCommand, it has a dictionary 
(fields) with a magritte description... and again, a large set of 
not-recordable data.

My questions is: how can I solve this problem? I can just serialize 
(with SIXX or binary) fields, but that does not ensure data integrity 
if I reconstruct it latter... or I can just manually get enough data to 
reconstruct ir manually when needed... but I'm not sure if this is a 
good approach or not.

Any opinion?

Thanks in advance,
Esteban




More information about the smallwiki mailing list