Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47855 invoked from network); 27 Dec 2010 11:05:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Dec 2010 11:05:26 -0000 Received: (qmail 76016 invoked by uid 500); 27 Dec 2010 11:05:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 75716 invoked by uid 500); 27 Dec 2010 11:05:23 -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 75708 invoked by uid 99); 27 Dec 2010 11:05:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Dec 2010 11:05:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shenoudab@gmail.com designates 209.85.216.52 as permitted sender) Received: from [209.85.216.52] (HELO mail-qw0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Dec 2010 11:05:15 +0000 Received: by qwi4 with SMTP id 4so8604219qwi.11 for ; Mon, 27 Dec 2010 03:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=XQs8bsunaow5mL50EtYB3x4icoXbg3sjDyzL0yVw7yU=; b=v4Rfptsqv3AZcPHjaFWQgQrvR+lSQbwxT4Adm6DuoRCaOGa9ePlcol6c802OV9n+Bh Bl/uClwkf5zj48ZMPnB0xDoaFGeb0WzJ+XrR9AeOKUhECc9EAwJWZrlifNhDqFzEVyhF H/Pfk3qx+/yV39mfQ6Edy2lAkUOnlZKVT/+RA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YFuVD72UV1yFFbvO7Xs7qL1DfKu8ADM64LrvZaFg5hpHtaboo0+HRyHxrBxPTCx0G/ 3TFzKmcEa056njRwzijyPPcqtyXkxmnYw4xtwMLG2QA7xPMb4pbjQmlulHYD1nU8VPAU wM1dYIsLyCIUcLv7oXYmCZpVYzstcTlLwTKiM= MIME-Version: 1.0 Received: by 10.229.43.74 with SMTP id v10mr10565510qce.293.1293447894144; Mon, 27 Dec 2010 03:04:54 -0800 (PST) Received: by 10.229.190.5 with HTTP; Mon, 27 Dec 2010 03:04:54 -0800 (PST) Date: Mon, 27 Dec 2010 13:04:54 +0200 Message-ID: Subject: CouchDB Carts and Orders Best Practice From: Shenouda Bertel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e64bbe8e4418d40498624eec X-Virus-Checked: Checked by ClamAV on apache.org --0016e64bbe8e4418d40498624eec Content-Type: text/plain; charset=ISO-8859-1 Dears CouchDB Users, kindly, this tis my first official share after subscribe to CouchDB Mailing List. I Would Like to ask for the Best Practice to Implement Shopping Carts in CouchDB, in my application i can the Cart Model (Items). in the upcoming scenarios, any added item will be added to the document and save the document which is a huge behavior and may have inconsistent items. - As an array property of items in Order Document, which will carry the items added to this Order which will create lots of orders that is not purchased, and didn't have accurate numbers of Completed Orders. - As an array property of items in User Document, which will have that added items to that User. in my case, the user will have a limited numbers of items, for example in Conference Registration the user will buy only one Pass and one reservation for Hotel if he likes. also in this case i will have multiple time of User Document Save in every time Item added or changed. - As a separate Document for Cart which will have the items added to this card and belongs to a user. - to add the cart items in memory and when checkout and creating an order, will going to add the items in the memory to the items property in the order Document. What is the best practice for the carts implementation with CouchDB, which save the performance of the application, with less requests to CouchDB and without several saving of the CouchDB Document. Thanks, Shenouda Bertel --0016e64bbe8e4418d40498624eec--