Return-Path: Delivered-To: apmail-hadoop-zookeeper-dev-archive@locus.apache.org Received: (qmail 48914 invoked from network); 22 Jul 2008 10:25:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 10:25:00 -0000 Received: (qmail 94578 invoked by uid 500); 22 Jul 2008 10:25:00 -0000 Delivered-To: apmail-hadoop-zookeeper-dev-archive@hadoop.apache.org Received: (qmail 94551 invoked by uid 500); 22 Jul 2008 10:25:00 -0000 Mailing-List: contact zookeeper-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-dev@hadoop.apache.org Delivered-To: mailing list zookeeper-dev@hadoop.apache.org Received: (qmail 94540 invoked by uid 99); 22 Jul 2008 10:25:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 03:25:00 -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 chris87@gmail.com designates 209.85.132.245 as permitted sender) Received: from [209.85.132.245] (HELO an-out-0708.google.com) (209.85.132.245) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 10:24:06 +0000 Received: by an-out-0708.google.com with SMTP id c37so1949224anc.49 for ; Tue, 22 Jul 2008 03:24:30 -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=MYThap6YTuCyOKcyMghA1FP57FAd0vsg6nuNsdqYbTY=; b=Lvsda6s9Yb3CDd3i/EmfQLlHo5svLKB3ry+1r+R2T6VVs8ijUxJ8cFYriAg1yO4M0m XmkeCEs+mcCKpBsVOf38bEOH0EWdBf5knswszhhzfzJutXGSJIVb6W7LJdk1kdarjvzU 2BMkGAn6T+0h0ocyxkurHPghGvJbd6LN1ipQM= 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=GghUfvKLFtVtEmTtTW+Mrgi47OI76WF+HOqTxFxOFxuwpucpxSo6aX1evVM5esx5Ll rjgCU/TD4SDFX616NSyu8zOnQu0qprSmWV8/qjlQAINRDhZICabMSFq5j27RiCnc8aDd UDLJehPvCRvswAhuqRievgaGNJSZ8OvW4J87c= Received: by 10.100.171.10 with SMTP id t10mr2293063ane.123.1216722270569; Tue, 22 Jul 2008 03:24:30 -0700 (PDT) Received: by 10.100.196.7 with HTTP; Tue, 22 Jul 2008 03:24:30 -0700 (PDT) Message-ID: <6b12e470807220324o40a83bf6q31ffc47e2fa63efc@mail.gmail.com> Date: Tue, 22 Jul 2008 11:24:30 +0100 From: "Chris Smith" To: zookeeper-dev@hadoop.apache.org Subject: Re: Thrift interface In-Reply-To: <487D6F4B.1060004@yahoo-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6b12e470807141036l1795071du70137ddba8165952@mail.gmail.com> <487D6F4B.1060004@yahoo-inc.com> X-Virus-Checked: Checked by ClamAV on apache.org I've now got a working stand-alone 'proxy' that acts as a Thrift server and a ZK client. Is this something you guys would want/accept as a contrib module? I appreciate that you already have SWIG and FUSE bindings, but I think the Thrift interface makes more sense in environments where [most] other services are already exposed using Thrift. At present the code is not hugely nice, as it has to convert between Thrift-generated objects and Jute-generated ones; if you did switch to using Thrift RPC for ZK's serialisation layer it'd make this a lot more tidy. Also, it doesn't support watches at the minute, although I can think of several ways this could be done if needed (I don't think we actually need them for what we're going to be using the Thrift interface for). - Chris On Wed, Jul 16, 2008 at 4:47 AM, Benjamin Reed wrote: > Hi Chris, > > We have talked about using Thrift for our serialization layer (I thought > we had a Jira opened for it, but I cannot find it). Thrift RPC is a > different story. You would lose watch callbacks. I think it would also > be hard to support sessions and thus ephemeral nodes. Finally, your > client and server throughput would be quite low since clients wouldn't > be able to pipeline requests (it appears you can only have one request > outstanding at a time) and servers have to dedicate a thread to service > a request. > > ZooKeeper clients are more than simple RPC dispatchers they also do > session maintenance and completion processing, so you need something a > bit more sophisticated at the client. > > I assume you want this to get bindings for other languages. We have SWIG > and FUSE bindings for this. > > If you really want thrift, I think there is a combo solution: implement > a standalone service, thrift server and zk client, and run it on each > ZooKeeper server. > > ben > > Chris Smith wrote: >> >> Hi, >> >> I'm currently thinking about implementing a Thrift interface for >> ZooKeeper, and wanted to get some opinions on it before I start. I can >> basically see two possible ways to implement it: >> >> * A standalone service which implements both a ZooKeeper client and a >> Thrift server, and basically acts as a proxy between the two >> * Integrate the Thrift server with the ZooKeeper server, so that ZK >> servers themselves handle the Thrift connections >> >> I think the former is probably nicer from a development stand-point, >> but the latter seems better from an end-user stand-point. Has anyone >> else thought about doing this (or actually done it!), and does anyone >> have any preferences/comments with regard to the above options? >> >> Cheers, >> >> Chris Smith >> > >