Hi, I have written an application which on initiliazation calculates a graph based on data in DB. And then any updates on the graph(global variable) , i am doing both on graph and db. Everything works fine as long as i work on single mongrel. When i use 2 mongrels, second mongrel cannot see graph in the memory. It gets a null variable. How do i do this so that graph built in the memory is accessible to all mongrels? Regards, Sandeep G
on 21.04.2008 08:39
on 21.04.2008 15:45
> How do i do this so that graph built in the memory is accessible to all > mongrels? Save data to a DB, or to a session variable ? remember it's like having two separate processes--they don't share memory at all by default. -R
on 21.04.2008 15:57
Any this really isn't a "mongrel" issue, but more an issue with the framework you're using.
on 21.04.2008 17:31
Sandeep you may use a different ruby process to contain this graph and your mongrel based rails processes may talk to this drb instance and access the graph. 2 or more mongrel process do not share any data as they are completely different processes. Piyush