Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB3D11069E for ; Fri, 15 Nov 2013 02:06:29 +0000 (UTC) Received: (qmail 37719 invoked by uid 500); 15 Nov 2013 02:06:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 37682 invoked by uid 500); 15 Nov 2013 02:06:28 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 37674 invoked by uid 99); 15 Nov 2013 02:06:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 02:06:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kxepal@gmail.com designates 209.85.212.180 as permitted sender) Received: from [209.85.212.180] (HELO mail-wi0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 02:06:23 +0000 Received: by mail-wi0-f180.google.com with SMTP id ey16so370748wid.1 for ; Thu, 14 Nov 2013 18:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=0ZhimJItr6vcGyyBRoOnA30momYGiGK2IhARN/77yEA=; b=RG0M9mrDW2Hwc9YGIFju9vqaCIEv/qEIvpbJ2pWmuzbdJmosea5sPO1/J5slA/aaqa 0AEMTZ5uhsX54LiT9P+g3NJxaUqNv7SWa5WlEF28p1NRvjX9kLkVfHkHYRzcyskb2sqm mf61QOmadKThbCO9aT7MDApEDFkhjU2yaimbrwT7RlZnMMp1Je+75SI1zbZ15oQF89mw zIYXbXAfD6t4jgRFP5l7aKV08NTM5y1Q7cmAtEMhGldJ0/cDXp/pUR1nzFtrvqGpAWm1 OKeLy3jViHx0Me58Vp9VxAzIwyg9sXXX0KFGjq/FXONnHBC9+Vgbr6g8gTDrn8n6j1YO 7QpA== MIME-Version: 1.0 X-Received: by 10.194.11.67 with SMTP id o3mr5033346wjb.0.1384481162096; Thu, 14 Nov 2013 18:06:02 -0800 (PST) Received: by 10.180.24.99 with HTTP; Thu, 14 Nov 2013 18:06:01 -0800 (PST) In-Reply-To: <6A445F3B-A89A-455D-AE04-7291687F8EEB@programmazione.it> References: <75175787-0293-4918-9CC3-0CE24B8B41C6@programmazione.it> <922FCD26-A6B7-4D45-90F8-18804EF018BA@programmazione.it> <6A445F3B-A89A-455D-AE04-7291687F8EEB@programmazione.it> Date: Fri, 15 Nov 2013 06:06:01 +0400 Message-ID: Subject: Re: show/list From: Alexander Shorin To: "user@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Nov 15, 2013 at 5:49 AM, Filippo Fadda wrote: > On Nov 15, 2013, at 2:13 AM, Alexander Shorin wrote: >> Need some example. > > A simple one. Reddit, votes per post. Vote as document is ok. >> Certainty, your users may ask to add missiles control panel for their >> blogs, but sometimes you need to say "no" for features, that goes >> beyond of your project idea. If they still are within it and you got >> some design issues: may be something wrong with it. > > You can't even know what a client is gonna ask you or where the business = is gonna drive you. You can just make speculations. > >> If you aware, document updates for CouchDB have high cost (time and >> disk space), so this is the last thing how you'll use CouchDB. To >> count article views you need setup external handler that will act as >> HTTP proxy to redis and trigger it on every article load by browser. > > I'm aware, but this is not the point. I'm trying to demonstrate there are= cases where CouchDB doesn't fit the requirements and others (more often) a= couch app doesn't. Put Redis aside CouchDB is easy, using a framework asid= e a couch app is not a viable solution. It's always possible to imagine situation when some tool will be useless and some other handy and good (: CouchApp is no more, but group of design functions as single logical application, that CouchDB easily hosts and able to execute by users request. To interact with other system or remote services you may use external handlers. To run custom background services os_daemons helps much. All these are CouchDB features that could be used to solve specific problem. Not sure why you're trying to avoid them all. > You can replace impressions with votes. To avoid conflicts you save each = vote as a separate document, to get the score you need to assemble the arti= cle and a _sum result. :-) While votes are ok, but having article hit as document isn't wise approach: to note why share your app url on /. , /r, hn or other resource which could generate a lot of hits - you'll quite soon realise that some front-end proxy required to buffer updates and forward them to CouchDB as bulk update. >> Same as for design functions: make them in >> python/php/ruby/java/clojure and use all power of these languages. >> Even for additional querying CouchDB on your risk since this is wrong >> way to go! > > Of course, I can modify my query server to use ElephantOnCouch, but like = you said, it is not the right way to go and I don't see a use case for it. = If I have some heavy elaboration task, I can use a daemon, I can use Gearma= n and execute a PHP job inside it. But this open doors for you also to rich php library set which may be quite useful, right? -- ,,,^..^,,,