[Pipet Devel] permanent vs. temporary storage WAS about XML

Brad Chapman chapmanb at arches.uga.edu
Fri May 5 15:30:07 EDT 2000


> "J.W. Bizzaro" wrote:
>> 
>> Brad, while we're on this topic, perhaps XML writing should be done 
only
> when
>> the user chooses to "save" a network.  You could use DOM in-between 
saves
> to
>> speed things up.
> 
> You may recall from my earlier message about the
> "pseudo-distributed-filesystem" that we want to treat networks (of 
the BL and
> PL kind) something like a word-processing document: The user can 
choose
> "new",
> "open", "save", "save as", and "close" for any network.

I understand your point, and it definately would be possible to keep 
everything in dom and save it when the user chooses save, but there 
are 3 problems:

1. XML in dom format can't be parsed using a standard parser, and so 
we always have to use the dom_iterator to iterate through xml. This 
method is *much* slower than parsing with a parser. So I don't think 
we would see a big speed up in everything was in dom.

2. There would be no "crash" recovery since everything would be lost 
if Piper crashes (since nothing is stored in the filesystem).

3. We would have *a lot* of information in memory all of the time, 
which I don't think would scale well to complex applications/scripts 
with lots of nodes. This could also lead to crazy confusing data 
structures in the code. In addition, this would make debugging the 
thing a serious problem. Right now you can often pick up problems by 
browsing the temporarily stored xml, in this case you would have to 
dumb all kinds of xml to a file and sort through it.

Brad  






More information about the Pipet-Devel mailing list