I hoping to find/write an ActiveRecord backend which stores each record
as a file in a directory, rather than as a row in a table in a database.
I'm not concerned about scaling or concurrency issues. My questions
1) Does such a backend exist?
2) Is there some logical inconsistency between the behavior of
ActiveRecord and the limits of a filesystem?
3) Where should implementation of such a backend begin? should I define
an AbstractAdapter? or should I scrap ActiveRecord all together, and
try to use another class as the base of my models?
In terms of what this would look like, I'm thinking that each record
would have a string id, which would serve as the file name, either a
single text field aside from the ID and would be equal to the entire
file contents, or allow for multiple attributes, and save them into the
file in the form of a YAML hash.
The use case which got me thinking of this was the desire to have an
rails application which users would often run locally on their own
machine, but with which they could share (active)records with other
users running other copies of the application on their machines. If the
records were saved as files, then
1) it would be easy for users to browse/inspect the records outside of
2) the sharing and merging of the records across instances could use
some existing distributed VC system like GIT
the actual application could fairly easily wrap some simplifying UI
elements around something like git which could handle the pushing
pulling and merging of actual records between instances all the while
tracking who made what changes when.
Please don't hesitate to tell me if you think there are reasons why this
wouldn't/shouldn't work. Thanks -- Eric