[Haskell-cafe] Re: SYB and/or HList for XML, deserialization and collections

Chris Eidhof chris at eidhof.nl
Tue Dec 26 18:41:46 EST 2006


> == Deserialization ==
>
> HAppS periodically checkpoints application state to disk.   
> Developers may want to add or remove fields from their state types  
> for from data types used by their state types.  The current  
> solution is to have the developer assign a version number to  
> state.  If state changes then the developer provides dispatch to a  
> deserialization function based on that version number.
Well, it is indeed a fact of life that apps get updated, and data- 
models change. I think Ruby on Rails has implemented this quite good,  
using migrations. Basically, when you're using a migration, you  
specify the differences between two datatypes (or in their case,  
tables). If we found some way to determine those diffs automatically,  
and then require a function that maps the old types to the new  
types... but maybe I'm thinking too difficult. Just thinking out  
loud, really. We could encode the structure of the used datatypes  
into the state, and let HAppS automatically check if it needs to  
migrate...

One of the concepts that I also like about RoR is that they have 3  
modes, development, production and test. Three different databases  
are used for the three modes, so you're not messing in your  
production database. Maybe this is something to think about, too.

-chris



More information about the Haskell-Cafe mailing list