Am Montag, den 01.12.2008, 13:33 -0800 schrieb tphyahoo:
> 1) On second thought, Eelco's map did make sense.
>
> 2) I played some more with migrations, and ran into a problem,
> attached at
>
> http://groups.google.com/group/HAppS/web/happs-migration2.tar.gz
>
> Can someone help me fix this?
> thartman@thartman-laptop:~/happs-migrations/example>runghc
> MigrateToState3.hs
> MigrateToState3.hs: Couldn't find handler for event of type:
> StateVersions.AppState2.InsertPage
I think the problem is that the module containing your current state
changes names with each state version, which confuses HAppS.
What I do is that I alwas have src/State.hs with the current state, and
src/Old/State<n>.hs for the old states. So when I need a new state, I
move src/State.hs to src/State3.hs, and put the new stuff in
src/State.hs.
OTOH, if changing state modules are supposed to be supported, than this
looks like a HAppS bug to me (but I’m not sure, maybe there is a
subtlety I’m missing)
BTW, it works if you add
> createCheckpoint control
at the end of MigrateToState2.hs, and it breaks earlier if you remove
that line from CreateState1.hs
Greetings,
Joachim
--
Joachim "nomeata" Breitner
mail: ma...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: nom...@joachim-breitner.de | http://www.joachim-breitner.de/
Debian Developer: nom...@debian.org
There is indeed a reason for this. If you change the module name then
you can't take advantage of the built-in scalability features. That
is, you will not be able to do replication or partitioning.
HAppS-0.9.3 is able to deal with changing module names but /only/
after a clean checkpoint. It /will/ fail if the state is changed after
the checkpoint. I would not recommend using this feature for a
production application.
--
Cheers,
Lemmih
Partitioning isn't complete but replication is.
--
Cheers,
Lemmih
http://happs.org/repos/HAppS-Server/Examples/MultimasterTest1.hs
http://happs.org/repos/HAppS-Server/Examples/MultimasterTest2.hs
It requires spread to be configured and running.
--
Cheers,
Lemmih