I have an issue with manipulating large number of record objects of type ActiveRecord model(Records are extracted from a complex operation but from the same table) and I want to pass that object set around between controller actions. So I have couple of solutions but is wage about which way to choose. Simpler but uglier solution is to save it in sessions. But as I know saving large object set in sessions clearly slows down application performance because of frequent serialization and de-serialization process(Serialization is time consuming I guess from Web services - SOAP and binary formatting). Second option which seems to be promising is saving all these ActiveRecord model objects as a blog in the database, and with one query we can retrieve all and can do the necessary operations with that dataset. But I don t know how to iterate through all objects after retrieving it from the database because it is still in binary object format. Calling inspect method shows all attributes and values but I am totally perplexed. Can anyone tell me how to save ActiveRecord model type objects as a single record binary obejct and retrieve it and go through the dataset. Do I need encoding like Base64 ?. Finally would memcached yield desired result?? or at least any links that can follow to solve this ?
And sorry for the lengthy question and thanks in advance.