Madeleine on Rails
-
Upload
andrzej-krzywda -
Category
Technology
-
view
1.553 -
download
0
Transcript of Madeleine on Rails
Off the Rails(Madeleine on Rails)
AndrzejKrzywda.com
Not even a plugin yet.
Work in progress....
Started on Saturday at 2pmFinished at 3.30am
Demo the sample app.
Uses Madeleine.
What is Madeleine?
Imagine a world without relational databases
No ORM!
You operate on objects that live in memory.
Extremely fast!
Yes, you have to have enough RAM.
Sometimes your objects are serialized to a file.
Changes between snapshots are serialized as
‘command’ objects.
The whole concept is called “Prevalence”.
Prevayler is a Java implementation of this
concept.
Madeleine is a Ruby implementation of this
concept.
Remember Instiki?
Created by DHH, the first versions were using
Madeleine.
SnapshotsCommandsRoot object
Automatic creation of command objects.
How to apply it to Rails?
Single process only
config/initializers/madeleine.rb
Reads from snapshotStarts the AppService
Starts a “snapshotting” thread.(saves the files to db/madeleine/)
Add ApplicationController.app method
app/controllers/tasks_controller.rb
Communication with the app.rb
Enable classes caching (even in development)
Otherwise you loose everything on the next request.
How to deal with “schema” changes?
Object migrations.
Summary
It seems to work.a VERY different way of thinking
Pure objectsA plugin?
Thanks!