Mongrels servers sharing common memory space

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

You can't without some intermediary (the database, memcached etc...)

Fred

Hi Fred,

I thought of Memcached, but later read somwhere that is just a cached replica of DB. Is this true? Or Can memcache contain anything ?

Say i want a variable "Count" to be in memcached that is accessible to all mongrel servers. How do i do that?

Any thoughts on sharedmemory?

Regards, Sandeep G

Hi Fred,

I thought of Memcached, but later read somwhere that is just a cached replica of DB. Is this true? Or Can memcache contain anything ?

memcache can contain arbitrary data.

Fred