Radio twitter

Hello all,

I am new to this list and I just wanted to see if someone can help me out with a small problem I have.

I am building a Rails app using web services (i.e. SOAP and XML-RPC possibly REST later). My problem is that I want to load a, relatively, big object map (~5M) into memory as my application will not make use of any database backend.

I’d like to load this object map while rails is booting up and then be able to access it from the controllers. Does anyone know how to do that (i.e. load some object into a shared memory in rails that makes it available to the controllers)?

Thanks a lot in advance,

Hello all,
I am building a Rails app using web services (i.e. SOAP and XML-RPC possibly
REST later). My problem is that I want to load a, relatively, big object map
(~5M) into memory as my application will not make use of any database
backend.

(You might have wanted to post it under a new subject but rather posted as a
follow-up of the present subject? anyway...)

I'd like to load this object map while rails is booting up and then be able
to access it from the controllers. Does anyone know how to do that (i.e.
load some object into a shared memory in rails that makes it available to
the controllers)?

If the object map doesn't change at all, it should be safe just to load it in
environment.rb, and the controllers will be able to use it in either development
or production mode. The drawback being that each Rails instance has one
copy of it.

If you need to update the object map often, perhaps something like
MemCached can help.

d.

Hello all,
I am building a Rails app using web services (i.e. SOAP and XML-RPC possibly
REST later). My problem is that I want to load a, relatively, big object map
(~5M) into memory as my application will not make use of any database
backend.

(You might have wanted to post it under a new subject but rather posted as a
follow-up of the present subject? anyway...)

Sorry, yes, I didn't notice... My fault.

I'd like to load this object map while rails is booting up and then be able
to access it from the controllers. Does anyone know how to do that (i.e.
load some object into a shared memory in rails that makes it available to
the controllers)?

If the object map doesn't change at all, it should be safe just to load it in
environment.rb, and the controllers will be able to use it in either development
or production mode. The drawback being that each Rails instance has one
copy of it.

So if I load it as:

@my_object_map...

that should be ok and available to the controllers?

If you need to update the object map often, perhaps something like
MemCached can help.

Nope, it will only change every couple of months in the max.

Thanks !