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 8531A742C for ; Tue, 18 Oct 2011 10:06:11 +0000 (UTC) Received: (qmail 54881 invoked by uid 500); 18 Oct 2011 10:06:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 54544 invoked by uid 500); 18 Oct 2011 10:06:04 -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 54530 invoked by uid 99); 18 Oct 2011 10:06:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 10:06:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.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 (athena.apache.org: domain of ido.ran@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 10:05:57 +0000 Received: by yxm34 with SMTP id 34so558177yxm.11 for ; Tue, 18 Oct 2011 03:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Xb+4qTyVZ0p9Whvl23eFpiOB7kX0es6HKMtTf9dD/yg=; b=qTF1e9XvVLuD/z4gfbmw611YValH5g7BqPrHMbLtJwiEbte3Ryu2qs4/U2j97a799a tv77yauUdsLnOr3AMgYaSg4PDlH83vPoLOFzEohzI1ANFVzmRBtWXFAmxEqo8E1/9plU uty+Czu6yy+4dhkNaWtuQy0creuB7WySGEkuY= Received: by 10.42.135.69 with SMTP id o5mr3390098ict.34.1318932336305; Tue, 18 Oct 2011 03:05:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.18.3 with HTTP; Tue, 18 Oct 2011 03:05:05 -0700 (PDT) In-Reply-To: References: <71BB085F-7B41-4A79-8A65-FB94618DC622@gmail.com> <0BDB9E38-5499-4151-AC6F-D1AD7965178F@gmail.com> From: Ido Ran Date: Tue, 18 Oct 2011 12:05:05 +0200 Message-ID: Subject: Re: Architecture Question To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e836c63667b04af8fdd77 --90e6ba6e836c63667b04af8fdd77 Content-Type: text/plain; charset=UTF-8 Hello again, I am developing a desktop application that run on Windows using WPF interface. The application loading and saving data using RESTful web service that is currently only a thin wrapper around relational database. My design require the following things: 1. Offline work - allow the users to work in offline mode when connection to the server is not working 2. Sync between local and remote databases - Either online or manual sync between databases 3. Conflict resolution - Both offline and sync may cause conflicts so I need a way to resolve them 4. Security - I need to authenticate the user and authorize them according to security rules. The first 3 requirements available in CouchDB out-of-the-box - the question here is what data model to use in order to take advantage of those those capabilities. My model is close to the following (top to bottom): - ProcessGroup is a data entity with name and set of Processes - Process is a data entity with name and set of activities - Activity is a data entity with name and set of participants and set of properties If I will create a document for ProcessGroup it will cause to much conflicts even if two users change different activities. On the other hand if I model each entity as it own document I can't be sure that when creating a Process with 100 activities all of the activities will be added, for example a power down in the middle of the process or CouchDB fail half way though the addition. In other words there are no transaction out side a document. Thank you all for the help, Ido On Mon, Oct 17, 2011 at 3:54 PM, Robert Wadholm wrote: > If you are building a CouchApp, for simplicity, you can also maybe checkout > Ryan Ramage's CouchApp Takeout: > https://github.com/ryanramage/couchapp-takeout > It will install CouchDB on Macs and PCs in the background (as well as your > CouchApp) as long as the user has the latest Java. It'll install your > CouchApp as a native looking app, and run it in the user's default browser. > You can get CouchDB running on a user's machine in about 2-6 minutes > (depending on download speed) without them having to know they have > installed anything but your app. And CouchApp Takeout is extremely easy to > set up (it's a CouchApp itself, so you just replicate it to your db, and > make a few minor changes to JSON and two images). > > Bob > rwadholm@maf.org > > > On Oct 17, 2011, at 3:42 AM, Ido Ran wrote: > > Many thanks > > On Mon, Oct 17, 2011 at 10:36 AM, Dave Cottlehuber > wrote: > > On 17 October 2011 07:16, Ido Ran ido.ran@gmail.com>> wrote: > Thank you all. I'm targeting Windows platform - so I'll be glad to hear > how can I run the database there. > It's not going to be in-process but I do need a seamless way to run it > without the client install it manually. > > Thanks > > You can bundle couchdb inside another windows app without users > needing to install it separately. Check > http://wiki.apache.org/couchdb/Quirks_on_Windows "Integrating CouchDB > into your Windows Applications", and make sure you include the > appropriate VC runtimes either in your app or as a dependency. > > I've found that you can also remove the two erl.ini files completely > and Erlang/CouchDB seems to run just fine without them. You'll still > need to fiddle your local.ini files for the correct paths of course. > > A+ > Dave > > > --90e6ba6e836c63667b04af8fdd77--