Redis for Storing Translations

434 views
Skip to first unread message

Stephen Johnston

unread,
Mar 16, 2010, 7:09:46 PM3/16/10
to redi...@googlegroups.com
Greetings,

We are considering using Redis to store translation strings for a large web application. I would very much appreciate input into:

1. The applicability of Redis for this purpose
2. Some heads up on techniques available in Redis to make this functional and powerful
3. Techniques for gathering sets of related data in fewer calls (multi-get ?)
4. Any techniques or other applications you all are aware of that are demonstrably better then using Redis for this purpose are of course welcome

-Stephen

Mason Jones

unread,
Mar 16, 2010, 7:34:42 PM3/16/10
to redi...@googlegroups.com
By "translation strings" do you mean the resource bundle type thing,
where you'd have a particular message like "Welcome" available in a
number of different languages? My initial thought is that it depends
on how you're going to want to get the messages. In general, the
simple thing to do would be for each message to have multiple
representations (one per language), with an id like "1:en" where "1"
is the message ID, and "en" is the language.

You could add each entry to a set for each language, if you would ever
need to get a complete list of all messages in a given language.

To get related data in fewer calls, you could do MULTI but I'd instead
think about how to group the messages. For example, if you've got a
signup page with 10 messages and you want to get them all at once, you
could create a SET to contain those messages in a given language, and
then do a SORT on that set to get all of the messages you need at
once.

I'm sure others will have interesting ideas for this too...

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.
>

Guo Du

unread,
Mar 17, 2010, 11:59:34 AM3/17/10
to redi...@googlegroups.com
On Tue, Mar 16, 2010 at 11:09 PM, Stephen Johnston
<stephen....@guildlaunch.com> wrote:
> We are considering using Redis to store translation strings for a large web
> application. I would very much appreciate input into:
It may be over engineered for this kind of simple string resource
which could be a simple/small data structure in your language (e.g.
map for java). Even redis is very high performance compare with other
on disk store, but still much slower than native data structure
especially for a remote redis store.

-Guo

Reply all
Reply to author
Forward
0 new messages