|
Introduction To MACIDFor now we're going to step away from Happstack.Server and making web applications with Happstack. Instead, we'll be talking about the persistant state system provided by Happstack.State: MACID. MACID is the Happstack storage mechanism that allows you to use whatever data structure you want to hold your permanent data, without worrying about getting it into and out of tabular form fit for storage in a traditional rdbms. Before delving into how it works let's learn a bit about it from an operational perspective. Assuming you have the tutorial installed and running locally:
The data you entered is stored on your filesystem in a directory under your running executable, called _local. ~/happs-tutorial>ls _local/happs-tutorial_state/
You can grep for it too.
thartman@thartman-laptop:~/happs-tutorial>grep -ra testuser _local
Hm... let's see, can we be sneaky and grep for the password? Try it, you can't. Because the password is stored as an md5 hash, out of respect for the privacy of your users. See the newUserPage function in ControllerPostActions if you're curious. Now it's time for your first application. |