# Radio twitter

**URL:** <https://www.ruby-forum.com/t/radio-twitter/106201>\
**Category:** Rails\
**Created:** [June 7, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/radio-twitter/106201 "2007-06-07T13:48:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean\_pereira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/da6949/32.png) [@jean\_pereira](https://www.ruby-forum.com/u/jean_pereira)\
**Post date:** [June 7, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/radio-twitter/106201/1 "2007-06-07T13:48:43Z")

</div>

Can someone help me?  
I like twitter a lot and I want to create radio twitter, which would be  
twittervision but on audio with the best messages. A raw example is  
here:  
[mp3travel.com&nbsp;-&nbsp;mp3travel Resources and Information.](http://tinyurl.com/382267) but it lacks some background music which would  
be nice. I am not a programmer so if someone wants to jump in, thanks!  
Radio twitter will be open source.  
Thanks!  
Jean

---

<div class="post-metadata">

**Author:** ![jean\_pereira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/da6949/32.png) [@jean\_pereira](https://www.ruby-forum.com/u/jean_pereira)\
**Post date:** [June 7, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/radio-twitter/106201/2 "2007-06-07T14:06:14Z")

</div>

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,

* * *

Enrique Comba R.  
removed\_email\_address@domain.invalid

I always thought Smalltalk would beat Java, I just didn’t know it  
would be called ‘Ruby’ when it did.  
– Kent Beck

---

<div class="post-metadata">

**Author:** ![jean\_pereira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/da6949/32.png) [@jean\_pereira](https://www.ruby-forum.com/u/jean_pereira)\
**Post date:** [June 7, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/radio-twitter/106201/3 "2007-06-07T16:50:39Z")

</div>

On 6/7/07, Enrique Comba R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![jean\_pereira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/da6949/32.png) [@jean\_pereira](https://www.ruby-forum.com/u/jean_pereira)\
**Post date:** [June 7, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/radio-twitter/106201/4 "2007-06-07T17:00:40Z")

</div>

On 7 Jun 2007, at 16:50, Lukhnos D. Liu wrote:

> (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.

> 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 !

* * *

Enrique Comba R.  
removed\_email\_address@domain.invalid

I always thought Smalltalk would beat Java, I just didn’t know it  
would be called ‘Ruby’ when it did.  
– Kent Beck
