On Thu, Oct 1, 2009 at 5:12 PM, tsuraan <[email protected]> wrote: > Ok, so in my case, a user needs to be able to edit his mailbox (delete > messages from it, mostly), so each user needs his own mailbox. If the > structure of the user table is something like: > > { "username" : name, > "mailboxes" : [ > { "entries" : [ list of messages ], > "source" : name of email source, > "name" : whatever the user wants to call the mailbox > }, > ... ]} > > Then email delivery for each email creator would be a map-reduce job > that delivers email into every box whose source entry matches the name > of the email creator. Does that make sense for Couch? Is that > something that is reasonable to do in a map-reduce job, and would it > perform reasonably?
Are mailboxes concrete documents or merely an abstraction (e.g. supported by tagging the mail messages maybe)? I like the latter better than the former. I'm not sure you need the reduce part of the MapReduce framework here if all you need is a list of messages. Be care generating a large amount of data from your reduce function; it's not meant to support that.
