On Mar 9, 2011, at 2:08 AM, Stefano wrote:

Hi Walter

Thank you for your answer. I already have watched that railcast but he
really only talks about changing the backend. He doesnt compare the
options of storing pages in the DB or retrieving them from locale
files, thats what my question is mainly about I guess.

Is it a good idea to store entire pages so possibly a lot of text in a
redis database or key driven storage? Or is it more to translate
little stuff like buttons, links, etc.

Regards
Stefano

My take-away from his 'cast was this:

1. Developer time is expensive, you probably don't want to spend it tinkering with translation files.

2. ActiveRecord is expensive for lots of little access points in the life-cycle of each page. As you note, this could be button labels, navigation option text, etc.

3. Redis is scary-fast because everything is in memory after the first request. It's acting in this case like ActiveRecord with memcached in front of it.

Now based on your follow-up questions here, I'm guessing you may end up with a mixture of these approaches, depending on how much content you are trying to store. I don't know if there are practical limits to how much you can stuff in a Redis field, or if there are performance and memory size trade-offs you should worry about. You'll want to mock something up and test it, or wait for someone with more experience to lean in here.

Ryan has a much older 'cast about storing "static" pages in ActiveRecord for ease of administration. Perhaps if the bulk of your page is coming out of one big request, rather than the death of a thousand cuts with each individual label and header being a separate request, this could be a good solution. Without looking at your pages and how your translation plan is structured, it's hard for me to say any more about this.

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to