Flat file as storage backend or what

Hi.

I’m just starting out with Rails. I’m thinking of writing a web based
PIM, partly as a learning experience, partly because I need one. I’ll
be using iCalendar and vCard files for for storage because it will let
me sync with PDAs, and use other already available PIMs.

What would be the best practice for this?

a) At the beginning of a session pull all my vevents and vcards into
ActiveRecords, and write them back to the flat file at the end of
every session?

b) Skip the ActiveRecord thing and read in the vcard/ical files on
every request?

I’m afraid that a) will give me a lot of syncing headaces and that b)
will be very slow. Is there a better alternative?

I tried to google this, but pulled up nothing.

On Sunday 02 July 2006 04:31, Alex P. wrote:

ActiveRecords, and write them back to the flat file at the end of
every session?

b) Skip the ActiveRecord thing and read in the vcard/ical files on
every request?

I’m afraid that a) will give me a lot of syncing headaces and that b)
will be very slow. Is there a better alternative?

c) Use only ActiveRecord, and add some “dump_to_vcards” action that you
can call whenever you actually want to sync stuff.

On 7/2/06, Christian R. [email protected] wrote:

c) Use only ActiveRecord, and add some “dump_to_vcards” action that you
can call whenever you actually want to sync stuff.

That sounds pretty alluring. That way I could store one vcard/vevent
per object and use ActiveRecord to do all my filtering and sorting.
Think I’ll give it a try.