incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ido Ran <ido....@gmail.com>
Subject Re: Architecture Question
Date Tue, 18 Oct 2011 10:05:05 GMT
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 <rwadholm@maf.org> 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<mailto: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 <dave@muse.net.nz
> <mailto:dave@muse.net.nz>> wrote:
>
> On 17 October 2011 07:16, Ido Ran <ido.ran@gmail.com<mailto:
> 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
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message