is redis suitable for cms/forum etc?

926 views
Skip to first unread message

surfman

unread,
Apr 22, 2010, 10:10:15 PM4/22/10
to Redis DB
Any body knows if Redis is suitable for cms,forums etc web app(no
video/audio/pics stored required)? Thanks.

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

Anton Bessonov

unread,
Apr 23, 2010, 11:30:35 AM4/23/10
to redi...@googlegroups.com

> Any body knows if Redis is suitable for cms,forums etc web app(no
> video/audio/pics stored required)? Thanks.
>
>
Yes.

Nick Quaranto

unread,
Apr 23, 2010, 11:32:44 AM4/23/10
to redi...@googlegroups.com
This is kind of like asking if a car is good for getting places.

Can you narrow it down a bit? 

Marc Byrd

unread,
Apr 23, 2010, 12:14:52 PM4/23/10
to redi...@googlegroups.com
first reaction:  What?  That's crazy talk.  ;)

2nd reaction:  It's so crazy it just might work!  Why not?

3rd reaction:  There are already dozens of open source cms's in every programming language...

Imho the bottom line might be illustrated w/ a contrived use case:  Tagging docs in your cms.  The old way to do that might have been to have a doctag join table, but if you have thousands of docs and each doc has dozens of tags, that will quickly become the largest table in your db (and woe to you if you also include lots of data about when the tag was added, modified, whether it's a special tag, etc. etc.).  

With redis on the other hand, it's as simple as adding it to an unordered set - heck you can even add it to the set without checking first, end result will be the same.  

Rather than building a new CMS, perhaps you could contribute to some existing open source project by forking it, moving some part of it to redis (e.g. doctag table or some other potentially large join table, friendships is always a good one these days), and report results, speedup, scale, etc.  

m

Salvatore Sanfilippo

unread,
Apr 23, 2010, 12:16:36 PM4/23/10
to redi...@googlegroups.com
On Fri, Apr 23, 2010 at 4:10 AM, surfman <chinas...@gmail.com> wrote:
> Any body knows if Redis is suitable for cms,forums etc web app(no
> video/audio/pics stored required)? Thanks.

Simple question, non simple answer.

The short question is: yes. But the longer one has different points:

- Yes it's fast and I saw tons of forums not able to handle users for
speed concerns
- Redis it's not good for searches itself. You *can* build specialized
searches with it, but for a standard CMS probably you want something
build to do searches.
- If your documents are a lot, it's a good idea to take metadata
inside Redis, and messages inside an SQL server. Also to use Redis VM
can be a good option.
- With sorted sets you can model a lot of forum-alike problems with
very good performances.
- You'll be able to collect stats with INCR with good performances and
simplicity
- You can use EXPIRE to create a forum where it's simple to understand
if a given user is "online". Just every time you see an user do a SET
+ EXPIRE 60, then perform a GET every time you want to check if a
given ID is online.

Cheers,
Salvatore

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



--
Salvatore 'antirez' Sanfilippo
http://invece.org

"Once you have something that grows faster than education grows,
you’re always going to get a pop culture.", Alan Kay

Marc Byrd

unread,
Apr 23, 2010, 12:28:03 PM4/23/10
to redi...@googlegroups.com
Hi Salvatore, all,

On the topic of search in particular:  I suggested the idea of search w/ redis, perhaps retrofitting sphinx or somesuch, and got the "What?! That's crazy talk!" first reaction, then the "It just might work" reaction ;)  

The reason I asked for zInterSum() was for search - it's a thing of beauty.  Can even cache the zInterSum results in redis and set an EXPIRE.  Also why I asked to be able to filter a scored set by intersection w/ unordered set (e.g. items of a certain type).  

Add clustering, configure to keep things in mem, add some map/reduce on the indexing side, leverage some existing text normalization stuff, and redis would make a killer search subsystem.  

So I respectfully disagree with your appraisal there - I think search may be one of the best things redis does.  

Cheers!


m

Demis Bellot

unread,
Apr 23, 2010, 12:35:44 PM4/23/10
to redi...@googlegroups.com
Well since it's related, I'm writing some documentation on how to go about designing a NoSQL application which just happens to use a simple blog application as the subject prototype :)

I use some advanced Redis features that provide simple solutions to some typical blog requirements.

I'm definitely interested in people's thoughts of things they would do different, as there is not a lot of formal documentation on the subject so I've just done what I thought was best (but that still actually works :).

- Demis
Reply all
Reply to author
Forward
0 new messages