Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 4890 invoked from network); 7 Jul 2008 23:14:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jul 2008 23:14:35 -0000 Received: (qmail 87821 invoked by uid 500); 7 Jul 2008 23:14:35 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 87786 invoked by uid 500); 7 Jul 2008 23:14:35 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 87774 invoked by uid 99); 7 Jul 2008 23:14:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 16:14:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 64.233.184.236 as permitted sender) Received: from [64.233.184.236] (HELO wr-out-0506.google.com) (64.233.184.236) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 23:13:43 +0000 Received: by wr-out-0506.google.com with SMTP id 68so1695675wri.15 for ; Mon, 07 Jul 2008 16:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ff26glg5+f4lwFINPZnU2ciLOUlZrwRUVObLUExRuKM=; b=fi2doJKqQKTQE3pepE7A/gAwqa7Y16XwHdC1h6d5vifBQrN0sKdHRLXo0G5+7J4luy 1bQrF0t2CIsbpv3RO0+AUEwF4TKp6x2JyDIqf74ds1qCOJzRpsS3AMCk5xvoW1LqQPBv q0RwUqEji0SlAifEvd7rhjg5v06ubhY9I31dk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hAV/mN+4B5tHrO4/hs5OQ1khJ4GhnZEUBMy5/trv7QXpoDM85GfyIsO1y30l/+J7xx Fn7xMNw0XnQYNVaLjyq27dTpebB/wabkvxffssYyStrJ0cVhcTZwW+j7FgxiYNWNELNn ln6AE9ts23UqzEZnOgyD7K96+T+jt5/ADHQP0= Received: by 10.90.97.18 with SMTP id u18mr5917674agb.8.1215472443476; Mon, 07 Jul 2008 16:14:03 -0700 (PDT) Received: by 10.90.90.6 with HTTP; Mon, 7 Jul 2008 16:14:03 -0700 (PDT) Message-ID: <510143ac0807071614y1f3ae750lc7b34c64e468e776@mail.gmail.com> Date: Tue, 8 Jul 2008 02:14:03 +0300 From: "Jukka Zitting" To: dev@jackrabbit.apache.org Subject: Re: [RT] Adding event interface to jackrabbit api In-Reply-To: <486CCF28.4090301@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <486CCF28.4090301@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Thu, Jul 3, 2008 at 4:07 PM, Carsten Ziegeler wrote: > when a repository cluster is used, it seems that a common problem many > people have is to detect if an observation event is send because of changes > on the local instance or a remote instance of the cluster. Clustering should generally be transparent to client applications, so I'm a bit concerned about adding functionality like this. What's the use case? The most relevant use case I can come up with is a case where multiple copies of the "same" event listener is registered for a (clustered) repository by multiple (clustered) instances of a client application. Then it would be nice if an event would be handled by only one instead of all of those listeners. Instead of making this coordination a task for the listeners (checking of the proposed isLocal() flag), how about if we pushed that responsibility to the repository? If, during registration, an event listener could be marked as a part of a special clustered set of listeners, then the repository could make sure that a matching event is only delivered to a single listener in that set. The nice thing about this is that as a general solution it doesn't even need to be clustering-related, it would work equally well for a single server that may serve multiple copies of the same client. Doing that in the general case might be a bit tricky, but a simpler version of the same idea would be for example to define a LocalOnlyEventListener extension interface for event listeners that should only be notified of locally (on the same cluster node) initiated changes. BR, Jukka Zitting