Hello all
Thanks for the comments. I should have made myself clearer in my second post (moral: don’t post after midnight!). The original query related to a simple case, which I had solved, but which alerted me to the problem of incompatible versions in Fuel. The next stage of my work (still in planning, hence some vagueness in description) will involve storing objects long term on disk, presumably in serialized form, and I am still considering which serializer to use. I shall be creating large numbers of domain objects – many thousands, possibly running to millions. The instance variables of the objects will be standard Smalltalk objects – strings, arrays, ordered collections, dictionaries – and possibly other domain objects. Each object will be identified by a unique string. In any particular exercise I want to have available in the image only the objects relevant to that exercise. The proposal is to have a database on disk, possibly using PunQLite or Voyage, where the keys are the object identifiers and the database entries are serialized versions of the objects. As references to the domain objects are encountered in the input, the relevant object will be materialized from the database in the image. If I use Fuel to serialize, and if I decide to move to Pharo 5, I may have the problem of converting all the entries in the database to a new version of Fuel. If I use STON, I think there should not be a problem of version changes. I have as yet no idea whether there is any advantage for either serializer in terms of efficiency, either space or time, but at the moment I am inclined to start with STON. If the serializing and materializing are put in a separate section, it should be possible to switch later without too much effort, if it seems desirable. If there is any obvious idiocy in these proposals, please let me know. Otherwise, thanks to all for your helpful comments. Peter Kenny From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of Mariano Martinez Peck Sent: 29 May 2015 02:19 To: Any question about pharo is welcome Subject: Re: [Pharo-users] How to move data between Pharo versions This thread may help you: http://forum.world.st/Fuel-version-td4823170.html Cheers, On Thu, May 28, 2015 at 9:19 PM, Ben Coman <b...@openinworld.com <mailto:b...@openinworld.com> > wrote: On Fri, May 29, 2015 at 7:17 AM, Sean P. DeNigris <s...@clipperadams.com <mailto:s...@clipperadams.com> > wrote: > Peter Kenny wrote >> I will have to convert all my files to the new version? As far as I can >> see, I could not do that using >> the device you suggest > > The thing is that it's only the serialization that is tied to a Fuel > version, so the workflow is (and I've done this to port my data from Pharo > 3.0 to Pharo 4.0 and then to Pharo 5.0): > > 1. In the older image with the data, upgrade Fuel to the latest version that > will load in that Pharo `ConfigurationOfFuel project stableVersion load` This does not cater for "storing object structures long term on disk." I guess the workaround is that the image used to store the objects needs to archive near the fuel files. But you'd need to be careful not to save it once you upgraded fuel versions. > 2. Serialize the data > If the Fuel version in #1 is the one that comes with the newer Pharo you're > porting to, you're done. You can now materialize in the newer Pharo version. > Otherwise... > 3. In the newer Pharo > a. Downgrade Fuel e.g `(ConfigurationOfFuel project version: > versionStringFromNumberOneAbove) load` > b. Materialize the data > c. Upgrade Fuel back to the normal version for the newer Pharo (replace > version string from 3.a. with the original version) > d. Serialize the data Some use cases may require multiple downgrades/upgrades, which could be annoying. An interesting idea might be for a new release of Fuel to rename the previous version of as OldFuel that is released in its own package. Then "some OldFuel version" could exist in parallel with the "current version." The "current version" might even be smart enough to identify the OldFuel version needed and load it into the image and continue materializing the data. A CI program might run through a range of OldFuel versions to track which remain working on future versions of Pharo. cheers -ben > > Now you can load the data into the newer Pharo. > > > Peter Kenny wrote >> could I set those to give different version numbers > > The problem is that the data format may not be compatible between the > versions. Mariano would be able to give a better answer, but I would be > afraid. What if it seems to work but corrupts your data?! > > Does the workflow I detailed make sense and cover your needs? > > > > ----- > Cheers, > Sean > -- > View this message in context: > http://forum.world.st/How-to-move-data-between-Pharo-versions-tp4829102p4829210.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > -- Mariano http://marianopeck.wordpress.com