Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Should I use publish/subscribe?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Salvatore Sanfilippo  
View profile  
 More options Jul 22 2011, 10:12 am
From: Salvatore Sanfilippo <anti...@gmail.com>
Date: Fri, 22 Jul 2011 16:12:03 +0200
Local: Fri, Jul 22 2011 10:12 am
Subject: Re: Should I use publish/subscribe?

On Mon, Jul 18, 2011 at 8:31 AM, tianyuan <iamtiany...@gmail.com> wrote:
> I got about 100 web severs, and I want all of these logs get together.
> so I am thinking about using publish/subscribe in Redis.

> Every web server publishs to to the same channel,
> one log processer subscribe this channel, and process every log it
> received.

Hello,

it sounds like a good idea. You are not going to store the logs into
Redis right?
instead you are simply using Pub/Sub as a way to collect logs in a central way.

An alternative is to push instead into a list with LPUSH, and the
"processor" of stats will use BRPOP or alike to get new results. This
way you can stop the collector for some time and logs will accumulate
into Redis memory.

> When the subscriber get the log, is the log still in memory or
> completely disappeared ?

Completely disappeared. This is why you may want to use lists instead.
But depends on your use case.

However Pub/Sub or queues are a good way to communicate between many
instances without inventing your own networking layer.

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 redis-db@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.