Return-Path: Delivered-To: apmail-james-server-dev-archive@www.apache.org Received: (qmail 45326 invoked from network); 5 Nov 2007 16:37:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 16:37:06 -0000 Received: (qmail 74177 invoked by uid 500); 5 Nov 2007 16:36:53 -0000 Delivered-To: apmail-james-server-dev-archive@james.apache.org Received: (qmail 74145 invoked by uid 500); 5 Nov 2007 16:36:53 -0000 Mailing-List: contact server-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Developers List" Reply-To: "James Developers List" Delivered-To: mailing list server-dev@james.apache.org Received: (qmail 74134 invoked by uid 99); 5 Nov 2007 16:36:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 08:36:53 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pauloslf@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 16:36:57 +0000 Received: by nf-out-0910.google.com with SMTP id 30so1340182nfu for ; Mon, 05 Nov 2007 08:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=0hMZ2qnrpJNJmzMaiMKkBEv2Quii8TFx5Kp9g7XridE=; b=uWvID3cSfb/OISJJsMQryDQeH91pit1aesnLzZaGjr1i8lHh/9i7CV38eJzArzfk1mLTeojOq5fgfkVW2/GMBM6QLtgtGfq8jhCqYqu+e+XTR6sQuk9pLe2ORm0C+GqXC+C8vQRVjcDra8CyGt3U5o5SgyY7bc4jCuiX9f1gY5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=l+YTkN2Wl/NSxL2w7KstJCrEWeEgY2OwhbzUk0wJfIelUCi+cOpv1jHMa4a2hBt7uOSd+uUa8Ao6viXKZvbUpP1AxKaoHP7aYQpZwEMF64E8cWoMU90BHiY7U0HqctNcJlJMLciqr/dl9S//IKjvtbf8krLgLtAKquRBL0yWvds= Received: by 10.86.50.8 with SMTP id x8mr3551712fgx.1194280594855; Mon, 05 Nov 2007 08:36:34 -0800 (PST) Received: by 10.86.79.10 with HTTP; Mon, 5 Nov 2007 08:36:34 -0800 (PST) Message-ID: Date: Mon, 5 Nov 2007 16:36:34 +0000 From: "Paulo Sergio" To: "James Developers List" Subject: Re: [MailboxManager] API Design In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10759_28212156.1194280594845" References: <2379623.21378141193824270208.JavaMail.root@elysia.void.it> <10642952.22470821193964871793.JavaMail.root@elysia.void.it> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10759_28212156.1194280594845 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Robert, On 11/5/07, Robert Burrell Donkin wrote: > > On Nov 4, 2007 8:21 PM, Paulo Sergio wrote: > > Hi all, > > hi paulo > > > i've been following the discussion and i would like to give my > opinion > > (although i'm not an expert). > > i think we are forgetting an important thing, we are designing an API > > thinking about the existent protocols, although i think we should think > also > > in what's next :) . > > > > In my case, i'm currently working in a web-service backend for james > using > > IMAP as a "front end protocol". Now i would like to start working in a > push > > mechanism, and i think about implementing IMAP Idle, i would have a > server > > sending the notification to james server, witch then would send the > > notification to the client. > > > > Well, this is one of the problems i think james has (correct me if i'm > > wrong), it lacks any type of push mechanism. > > In my case the server could send a session id to james, indicating what > > client should retrieve the new mails, the problem would be to get the > > session of the user that should be notified.. > > > > > > in my opinion i believe we should have some king of way of sending a > > notification/event to the mailbox or even better to any session, these > > would be send by an external server (my case) or by events sent by james > > server (ex: when a message is received, check if the user is connected > and > > if it is send a notification to the session) > > ATM the API allows mailbox listeners to be registered but the current > interfaces aren't great. a single method accepting an event is more > concise and extensible than including all calls in an interface. > > IDLE was touched upon earlier. Zsombor suggested that listeners would > registered at the mailboxmanager level. if the API were switched to > use events then every listener could receive events for every mailbox > and then ignore any that were of no interest. novel events could be > injected into the system by the backend implementation. listeners > would ignore any events they did not understand. > > would this mechanism be good enough? i believe so, but you mean that each user connected would be able to register as a listener and then be notified when something happens? what about notifications from an external service ? how will these work? Thanks, paulo f another open question is whether an explicit API session would be a > useful to tie things together. something like a session would probably > be needed to reduce the number of factory method calls required to > obtain an API for a particular mailbox. > > - robert > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org > For additional commands, e-mail: server-dev-help@james.apache.org > > ------=_Part_10759_28212156.1194280594845--