pier and SandstoneDB persistence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pier and SandstoneDB persistence

EstebanLM
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



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: pier and SandstoneDB persistence

Lukas Renggli
> 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.

Why not dispatch through every object? So that for example class
serialize themselves by name, and descriptions serialize themselves
using their accessor?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki