incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: Part2: What's up dev? About couchapps.
Date Wed, 26 Sep 2012 08:05:36 GMT
On Wed, Sep 26, 2012 at 7:58 AM, Eli Stevens (Gmail)
<wickedgrey@gmail.com> wrote:
> On Tue, Sep 25, 2012 at 10:25 PM, Ryan Ramage <ryan.ramage@gmail.com> wrote:
>> 1) We have to decide on the directory structure. Based on what benoit
>> and dale have brought up. I have opinions, along with others. Lets not
>> rattle sabres around this  yet. But pick something relatively user
>> friendly, and straightforward. This can be actioned in our weekly irc.
>
> Would it make sense to have the directory structure be something that
> isn't couchapp specific, and instead dump/load *entire databases*
> to/from disk?  I could see that actually making it a simpler tool,
> since there would be a natural tendency to resist a bunch of
> special-case handling for corner cases, ease of use, etc.  Instead,
> you'd end up with a directory full of:
>
> my_doc_id.json
> my_doc_id.attachments/my_bin_file.dat
> my_doc_id.attachments/my_image_file.jpg
> etc.
>
> Then the various couchapp tools could focus on various workflows to
> make creating the simple structure and calling the default DB load
> tool.
>
> I'm not a couchapp user, so feel free to discard this idea if it
> doesn't make sense or if it doesn't gain any traction.
>
> Cheers,
> Eli

The current structure isn't couchapp specific. In fact you can
clone/push a doc using erica or couchapp (py the original).

The structure reflect JSON properties on a doc, eg.:

folder/item -> {"folder": {"item": "value"}}
some.json will be addeded as {"some": contentofsomejson}
_attachments/ will contains all attachements.

Specific to ddoc :

views/vname/{map,reduce}.js
shows/
lists/

and even that is just the result of the structure above. The original
idea is to allow anyone to create a couch app using the editor he
want. That why you have plugin in eclipse, standalone editor on top of
it it's really easy. Somehow it also follow the plan9 idea of having
everything on the fs.

Also as a side note the couchapp fs schema is widely deployed around.
Even pubished a doc about it [1]


- benoit

[1] http://www.ibm.com/developerworks/opensource/tutorials/os-couchapp/index.html

Mime
View raw message