database - Happstack-state concept and docs? -


i'm starting making haskell web server. i've decided start happstack , happstack-state. , i'm feeling hard understand concept , attribute of happstack-state. new kind of database? or object-graph system?

can explain it's concept , attribute (especially acid, how persistent data on disk!) or point me document describes well?

here 2 basic introductions macid:

http://happstack.com/docs/crashcourse/happstackstate.html#happstack_state

http://www.kuliniewicz.org/blog/archives/2009/04/05/happstackstate-the-basics/

alas, neither covers ixset, datatype used macid provide sets multiple indexes (similar sql table).

macid "ram cloud" style persistent store, meaning entire dataset stored in ram. supports replication. development version focused on adding sharding support (among other things).

the thing makes macid unique stores normal haskell dataypes , queries written using normal haskell functions. not limited small subset of haskell datatypes such int , string. instead, can use user defined datatype.

although macid stores working dataset in ram , not built around relational model, still provide acid guarantees. durability property ensures once commit returns successfully, event not lost if server failure (or restart).

durability achieved logging each update event write-ahead log. if the server goes down, state can restored replaying events since last checkpoint.

an event in write-ahead log consists of name of update function , arguments function. since update events pure, replaying them results in same final state.

the binary format data stored in checkpoints or log events specified creating instance of serialize class. in cases can done automatically calling template-haskell function 'deriveserialize'. there migrate class used migrate values old formats new formats when change datatypes.

there old blog post on serialization , migration mechanisms here:

http://nhlab.blogspot.com/2008/12/data-migration-with-happs-data.html

that post refers 'happs', pretty same in happstack aside module names.

hope helps.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -