Incompatible STB file version

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

Incompatible STB file version

Stefan Schmiedl
Greetings all,

today I was visiting a customer who had a problem with
a Dolphin application I wrote this summer. Somehow
data had become inconsistent, but it should have been
easy to fix, I thought.

I opened a workspace and hacked out some code to read
in the relevant data, which is an object stored via
STBOutFiler>>nextPut:. After writing the modified data
back using the same methods, my original application
refused to load the data, because of an "Incompatible
STB version", and indeed, in the first few bytes
I can see a '0' in the 'old' file and a '1' in the
new.

You may have guessed that the program was written in
Dolphin 4, while I used Dolphin 5, and you are correct.

Now my question: How do I create D4-like STB with D5?

Is there a better of storing application data in external
files, so that they are accessible both from the D4-app
and the D5 development image?

Thanks,
s.
--
Stefan Schmiedl
EDV-Beratung, Programmierung, Schulung
Am Bräuweiher 4, 93499 Zandt, Germany                    <---- NEU
Tel. (0 99 44) 30 68 98, Fax (0 99 44) 30 68 97          <---- NEU
Public Key: http://xss.de/stefan.public

shhhh ... I can't hear my code!


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Ian Bartholomew-18
Stefan,

> You may have guessed that the program was written in
> Dolphin 4, while I used Dolphin 5, and you are correct.
>
> Now my question: How do I create D4-like STB with D5?

Wouldn't the easiest solution by far be to carry a copy of D4 around with
you (you can physically have D4 and D5 installed and running on one machine
at the same time - I'm not sure about legally) and use D4 when applicable?.

Persuading a D4 application to import a D5 generated stb file would not be
feasible without modifying the application and D4 image, and if you are
doing that, then you might as well recompile the app using D5 anyway.  I
suppose it might be possible to make D5 generate classes and a file out that
was compatible with D4 but it's not something I have tried - and wouldn't
like to without a strong reason :-)

> Is there a better of storing application data in external
> files, so that they are accessible both from the D4-app
> and the D5 development image?

If your data is reasonably simple then you could just write a binary
streamer for yourself.  If it is more complicated, with interrelated complex
objects, then that becomes a bit (probably a lot) more difficult.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Bill Schwab-2
In reply to this post by Stefan Schmiedl
Stefan,

> today I was visiting a customer who had a problem with
> a Dolphin application I wrote this summer. Somehow
> data had become inconsistent, but it should have been
> easy to fix, I thought.
>
> I opened a workspace and hacked out some code to read
> in the relevant data, which is an object stored via
> STBOutFiler>>nextPut:. After writing the modified data
> back using the same methods, my original application
> refused to load the data, because of an "Incompatible
> STB version", and indeed, in the first few bytes
> I can see a '0' in the 'old' file and a '1' in the
> new.
>
> You may have guessed that the program was written in
> Dolphin 4, while I used Dolphin 5, and you are correct.
>
> Now my question: How do I create D4-like STB with D5?

I'm not aware that it is possible (well, short of "anything is possible" -
I'm not aware of a magic switch for the purpose), though I'd enjoy being
proven wrong.

One could argue that this is almost a safety mechanism though, because
objects filed out from your D5 image could easily be inconsistent with D4 -
new classes added, etc..


> Is there a better of storing application data in external
> files, so that they are accessible both from the D4-app
> and the D5 development image?

STB provides an easy way to serialize objects, but there are issues with
versioning.  I keep old images and retire old apps so that I'm never faced
with the "downgrade" problem.

You might want to look at SIXX, but I've so far only downloaded it - I'm not
sure if I've even filed it in, and certainly can't comment on its versioning
(which STB handles very well IMHO) or robustness.  As an XML format, SIXX
will likely not be as compact as Dolphin's STB.

Serializing/versioning Object subclasses is easiest because you won't be in
competition with OA for version numbers, since Object does not have instance
variables.  I subclass a color-related class and have had an occaisional
snag with changes to the base system.  IIRC, I did some serious hacking in
the debugger and then developed a patch to file in before loading packages
that were affected, and then started over from a clean image with the patch.
In short, it wasn't bad to fix.

In short, if you want something that is forward as well as backward
compatible, then you will likely have to create your own neutral format and
teach your objects to read/write it.  If you really want to indulge yourself
(I'm only partly kidding here), you might try to find a way to use CORBA IDL
for the task; that might move us toward a CORBA ORB for Dolphin, and/or
might allow you to leverage anything similar and open for other Smalltalks.
You could also look at www.openoffice.org for examples of XML file formats.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

David Gorisek-5
In reply to this post by Stefan Schmiedl
With the OmniBase object database you get a portable object serializer which
works not only with D4 and D5 but also with VAST and Visual Works. It is
also very space efficient and can be used outside of database just storing
objects into files.

See http://www.gorisek.com

Best regards,

David


"Stefan Schmiedl" <[hidden email]> wrote in message
news:arbots$gual8$[hidden email]...

> Greetings all,
>
> today I was visiting a customer who had a problem with
> a Dolphin application I wrote this summer. Somehow
> data had become inconsistent, but it should have been
> easy to fix, I thought.
>
> I opened a workspace and hacked out some code to read
> in the relevant data, which is an object stored via
> STBOutFiler>>nextPut:. After writing the modified data
> back using the same methods, my original application
> refused to load the data, because of an "Incompatible
> STB version", and indeed, in the first few bytes
> I can see a '0' in the 'old' file and a '1' in the
> new.
>
> You may have guessed that the program was written in
> Dolphin 4, while I used Dolphin 5, and you are correct.
>
> Now my question: How do I create D4-like STB with D5?
>
> Is there a better of storing application data in external
> files, so that they are accessible both from the D4-app
> and the D5 development image?
>
> Thanks,
> s.
> --
> Stefan Schmiedl
> EDV-Beratung, Programmierung, Schulung
> Am Bräuweiher 4, 93499 Zandt, Germany                    <---- NEU
> Tel. (0 99 44) 30 68 98, Fax (0 99 44) 30 68 97          <---- NEU
> Public Key: http://xss.de/stefan.public
>
> shhhh ... I can't hear my code!


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Stefan Schmiedl
In reply to this post by Ian Bartholomew-18
On Mon, 18 Nov 2002 23:22:52 -0000,
Ian Bartholomew <[hidden email]> wrote:

> Stefan,
>
>> You may have guessed that the program was written in
>> Dolphin 4, while I used Dolphin 5, and you are correct.
>>
>> Now my question: How do I create D4-like STB with D5?
>
> Wouldn't the easiest solution by far be to carry a copy of D4 around with
> you (you can physically have D4 and D5 installed and running on one machine
> at the same time - I'm not sure about legally) and use D4 when applicable?.

This would be the easiest solution, but there I was, with only D5
on my laptop ...

>
> Persuading a D4 application to import a D5 generated stb file would not be
> feasible without modifying the application and D4 image, and if you are
> doing that, then you might as well recompile the app using D5 anyway.  I

Of course, if I had had the package sources with me on that day ...
I was travelling (too) light, you see?

I was simply not aware of this specific limitation of the STB file
format, but (for me, that is) it will not be a serious problem,
because some improvements on the system are in the works and the
next release will be a D5-deployed app.

> suppose it might be possible to make D5 generate classes and a file out that
> was compatible with D4 but it's not something I have tried - and wouldn't
> like to without a strong reason :-)
>
>> Is there a better of storing application data in external
>> files, so that they are accessible both from the D4-app
>> and the D5 development image?
>
> If your data is reasonably simple then you could just write a binary
> streamer for yourself.  If it is more complicated, with interrelated complex
> objects, then that becomes a bit (probably a lot) more difficult.

This is just what I wanted to avoid by using STB: Hey, look! Just dump
the store to disk and read it back in with a handful of messages! :-)

Thanks,
s.

>
> Ian
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Stefan Schmiedl
In reply to this post by Bill Schwab-2
On Mon, 18 Nov 2002 18:24:40 -0500,
Bill Schwab <[hidden email]> wrote:

>>
>> Now my question: How do I create D4-like STB with D5?
>
> I'm not aware that it is possible (well, short of "anything is possible" -
> I'm not aware of a magic switch for the purpose), though I'd enjoy being
> proven wrong.
>
> One could argue that this is almost a safety mechanism though, because
> objects filed out from your D5 image could easily be inconsistent with D4 -
> new classes added, etc..

Good point, Bill.

>
>
>> Is there a better of storing application data in external
>> files, so that they are accessible both from the D4-app
>> and the D5 development image?
>
> STB provides an easy way to serialize objects, but there are issues with
> versioning.  I keep old images and retire old apps so that I'm never faced
> with the "downgrade" problem.
>
> You might want to look at SIXX, but I've so far only downloaded it - I'm not
> sure if I've even filed it in, and certainly can't comment on its versioning
> (which STB handles very well IMHO) or robustness.  As an XML format, SIXX
> will likely not be as compact as Dolphin's STB.

I nominate "likely not be as compact" as understatement of the day :-)

Thanks,
s.


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Stefan Schmiedl
In reply to this post by David Gorisek-5
Hi David,

On Tue, 19 Nov 2002 09:37:46 +0100,
David Gorisek <[hidden email]> wrote:
> With the OmniBase object database you get a portable object serializer which
> works not only with D4 and D5 but also with VAST and Visual Works. It is
> also very space efficient and can be used outside of database just storing
> objects into files.
>
> See http://www.gorisek.com

I came, saw and bought it some time ago and use STS for versioning,
which is very comfortable and easy to use in Dolphin.

The old version of the app preceded this purchase, however.

Do I have to watch out for licensing issues if I make use
of Omnibase for this app (single user on one workstation?)

I noticed that the section on deployment are (still :-)
not written. Would I have to do something special besides
just setting it up in my development version and watch the
ImageStripper do it's magic?

On a side note: When you released patches/updates to your
products, would I get noticed as a registered user or should
I take a look from time to time?

Thanks for your excellent products.
s.

>
> Best regards,
>
> David
>
>
> "Stefan Schmiedl" <[hidden email]> wrote in message
> news:arbots$gual8$[hidden email]...
>> Greetings all,
>>
>> today I was visiting a customer who had a problem with
>> a Dolphin application I wrote this summer. Somehow
>> data had become inconsistent, but it should have been
>> easy to fix, I thought.
>>
>> I opened a workspace and hacked out some code to read
>> in the relevant data, which is an object stored via
>> STBOutFiler>>nextPut:. After writing the modified data
>> back using the same methods, my original application
>> refused to load the data, because of an "Incompatible
>> STB version", and indeed, in the first few bytes
>> I can see a '0' in the 'old' file and a '1' in the
>> new.
>>
>> You may have guessed that the program was written in
>> Dolphin 4, while I used Dolphin 5, and you are correct.
>>
>> Now my question: How do I create D4-like STB with D5?
>>
>> Is there a better of storing application data in external
>> files, so that they are accessible both from the D4-app
>> and the D5 development image?
>>
>> Thanks,
>> s.
>> --
>> Stefan Schmiedl
>> EDV-Beratung, Programmierung, Schulung
>> Am Bräuweiher 4, 93499 Zandt, Germany                    <---- NEU
>> Tel. (0 99 44) 30 68 98, Fax (0 99 44) 30 68 97          <---- NEU
>> Public Key: http://xss.de/stefan.public
>>
>> shhhh ... I can't hear my code!
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Incompatible STB file version

Bill Schwab-2
In reply to this post by Stefan Schmiedl
Stefan,

> > You might want to look at SIXX, but I've so far only downloaded it - I'm
not
> > sure if I've even filed it in, and certainly can't comment on its
versioning
> > (which STB handles very well IMHO) or robustness.  As an XML format,
SIXX
> > will likely not be as compact as Dolphin's STB.
>
> I nominate "likely not be as compact" as understatement of the day :-)

<gratuituousPreamble>
<evenLongerGratuituousSubPreamble>
<reallyLongGratuituousSubSubPreamble>
<datum>
<tag>
"Reply:"
</tag>
<value>
"Thanks!"
</value>
</datum>
</reallyLongGratuituousSubSubPreamble>
</evenLongerGratuituousSubPreamble>
</gratuituousPreamble>

I guess I see your point :)

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]