[preparing for major release 5 thomashartman1@gmail.com**20081210121636] hunk ./happs-tutorial.cabal 41 - AppStateSetBased + StateVersions.AppState1 hunk ./happs-tutorial.cabal 49 - SerializeableSessions - SerializeableUsers - SerializeableJobs - SerializeableUserInfos hunk ./happs-tutorial.cabal 51 - StateStuff hunk ./templates/feedback.st 5 -

I created a happs tutorial feedback thread at happs googlegroup. +

I created a + happs tutorial feedback thread + at happs googlegroup. hunk ./templates/feedback.st 11 -

For what it's worth, here are some nice things people have said about happstutorial +

For what it's worth, here are somthings people have said about happstutorial hunk ./templates/feedback.st 14 -


tk +
+ +

@tphyahoo Just wanted to thank you for your tutorial. I've used it to successfully create a blog-system (a pet project) in Haskell (http://gisli.hamstur.is/blog/). In the blog itself, which is in Icelandic, I'm going to explain the source code (http://gisli.hamstur.is/src/) to the Icelandic Haskell community (if one exists ;) + +

I was getting nowhere before finding your tutorial. There was however a slight feeling of set back when I realized that you hadn't written about HAppS-State. To my relief you were further along with the locally installed tutorial than happstutorial.com. Keep up the good work! + +

Best regards, Gísli (reddit) + +


+

Great work, thanks for the tutorials, they were definitely needed! + +

And the tutorial demo itself is awesome! + +

dons (reddit) +


+
Thanks for the cool tutorial. I want to learn about HAppS but the +
documentation is so poor there is nowhere to start. This is awesome +
+
Justin Bailey + +
+ +
> What happens if your HAppS deployment server experiences a power outage? +
> The way I deal with this both these issues with a public-facing happs application is to have a cron job that runs every minute, that will start the happs application if it isn't running. +
+
I would definitely not recommend that solution. (in worst scenario you +
get 1 min + session restore downtime). +
+
Maybe you could try running happs in non-daemonizing mode under tools +
like svadmin or http://supervisord.org/ , or use simple script like: +
+
#!bash +
while [ 1 ] +
do +
echo \$(date) - restart +
RUN_HAPPS_IN_NON_DAEMON_MODE +
sleep 1 # We do not want to DoS the server +
done +
+
If found this solution more reliable than cronjob. +
+
It also has an advantage, because parent app is instantly notified of +
children's death. +
+
I also wanted to thank you for great tutorial - as RnD engineer I was +
starring at Happs for some time, but lack of happs documentation +
resulted in forgetting this project. +
+
Marek Pułczyński + +
hunk ./templates/foreignchars.st 23 -and save this to HAppS State, this did NOT display correctly. (See AppStateSetBased.hs) I got \123 type +and save this to HAppS State, this did NOT display correctly. (See StateVersions.AppState1.hs) I got \123 type hunk ./templates/ghciflounderingaskdatastore.st 35 -
-- Defined at src/AppStateSetBased.hs:43:0-11 +
-- Defined at src/StateVersions/AppState1.hs hunk ./templates/ghciflounderingaskdatastore.st 56 -

*AppStateSetBased Control.Monad.Reader GHC.Conc Data.Set> :t askDatastore :: Ev (ReaderT AppState STM) (Set User) +

*StateVersions.AppState1 Control.Monad.Reader GHC.Conc Data.Set> :t askDatastore :: Ev (ReaderT AppState STM) (Set User) hunk ./templates/introductiontomacid.st 24 -
_local/happs-tutorial_state/events-0000000000:ß\$6¡·¢:1525374391 696985193?AppStateSetBased.AddUsertestuser e1 +
_local/happs-tutorial_state/events-0000000000:ß\$6¡·¢:1525374391 696985193?AppState1.AddUsertestuser e1 hunk ./templates/maciddatasafety.st 94 - In the case of HAppS data stored under _local, I would probably be rsyncing + In the case of HAppS data stored under _local, I would probably be rsyncing hunk ./templates/macidmigration.st 50 -

Ok... General migration notes (haven't yet applied to happstutorial, though I plan on doing this soon): +

Ok... General migration notes: hunk ./templates/macidupdatesandqueries.st 21 -

The macid state of our job board is defined in AppStateSetBased, +

The macid state of our job board is defined in StateVersions.AppState1, hunk ./templates/macidupdatesandqueries.st 26 -

From AppStateSetBased.hs +

From StateVersions.AppState1.hs hunk ./templates/macidupdatesandqueries.st 46 -

  • You set the necessary LANGUAGE pragmas for the macid machinery to work (see top of AppStateSetBased.hs) +
  • You set the necessary LANGUAGE pragmas for the macid machinery to work (see top of AppState1.hs) hunk ./templates/macidupdatesandqueries.st 60 +

    One thing to watch out for in mind is that because template haskell is being generated, the order that functions + appear in the AppStaten.hs modules matters (which is generally not the case in haskell). If TH can't find + generated code it needs, the module won't compile. (Perhaps this is something that could be fixed in TH + in the future.) + + hunk ./templates/macidupdatesandqueries.st 79 - askDatastore and initializeDummyData, in AppStateSetBased. + askDatastore and initializeDummyData, in AppState1. hunk ./templates/macidupdatesandqueries.st 83 -

    *Main> :browse AppStateSetBased +

    *Main> :browse StateVersions.AppState1 hunk ./templates/macidupdatesandqueries.st 106 -
       -- Defined at src/AppStateSetBased.hs:(178,2)-(191,27) +
       -- Defined at src/StateVersions/AppState1.hs hunk ./templates/macidupdatesandqueries.st 108 -
       -- Defined at src/AppStateSetBased.hs:(178,2)-(191,27) +
       -- Defined at src/StateVersions/AppState1.hs hunk ./templates/macidupdatesandqueries.st 110 -
       -- Defined at src/AppStateSetBased.hs:(178,2)-(191,27) +
       -- Defined at src/StateVersions/AppState1.hs hunk ./templates/macidupdatesandqueries.st 135 -

  • read and understand the .hs files that define the job board state: - AppStateSetBased.hs, SerializeableUsers.hs, and SerializeableSessions.hs +
  • read and understand the AppState1.hs file, which defines the job board state: +