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 8D8657D27 for ; Thu, 6 Oct 2011 03:20:13 +0000 (UTC) Received: (qmail 66437 invoked by uid 500); 6 Oct 2011 03:20:11 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 66362 invoked by uid 500); 6 Oct 2011 03:20:10 -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 66328 invoked by uid 99); 6 Oct 2011 03:20:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 03:20:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.180] (HELO mail-iy0-f180.google.com) (209.85.210.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 03:20:03 +0000 Received: by iahk25 with SMTP id k25so3891924iah.11 for ; Wed, 05 Oct 2011 20:19:42 -0700 (PDT) Received: by 10.43.50.199 with SMTP id vf7mr646290icb.9.1317871182187; Wed, 05 Oct 2011 20:19:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.218.69 with HTTP; Wed, 5 Oct 2011 20:19:22 -0700 (PDT) In-Reply-To: References: From: Jason Smith Date: Thu, 6 Oct 2011 10:19:22 +0700 Message-ID: Subject: Re: [Erlang] Custom modules in a view/show/list To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Well remember, there is no Erlang view server, there is a *native* view server. You can spawn a named process and ! and receive all day long. You can spawn a gen_server or a whole application. You can also store functions in named ets tables. If you have a cluster then you may need to re-define them. The usual "doesn't work in a cluster" warnings apply I suppose. Sounds like fun. But as Paul says, be careful! On Thu, Oct 6, 2011 at 5:06 AM, Thomas Van de Velde wrote: > I am mostly interested in sharing between a show and list as both can > generate similar outputs. > > On Wed, Oct 5, 2011 at 4:53 PM, Ryan Ramage wrote: > >> Great, this is just the hole we need to call external services, make >> requests, hot swap code, etc! >> >> oh wait, and screw up the view by making it non referentially >> transparent! :) I think Paul really meant *quite* careful. >> >> On Wed, Oct 5, 2011 at 3:42 PM, Paul Davis >> wrote: >> > Erlang code doesn't have a commonJS equivalent. If you were to put >> > code on the Erlang path you could reference it, but you'd want to be >> > *quite* careful about doing this for views. >> > >> > On Wed, Oct 5, 2011 at 4:08 PM, Thomas Van de Velde >> > wrote: >> >> Hi, >> >> >> >> How can I reference an external module from within a view, show or list? >> >> This would be to reuse code. >> >> >> >> Thanks! >> >> >> >> Thomas >> >> >> > >> > -- Iris Couch