Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3B487AC1 for ; Fri, 16 Sep 2011 11:04:36 +0000 (UTC) Received: (qmail 95083 invoked by uid 500); 16 Sep 2011 11:04:36 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 95049 invoked by uid 500); 16 Sep 2011 11:04:36 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 95040 invoked by uid 99); 16 Sep 2011 11:04:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 11:04:36 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 62.109.34.14 is neither permitted nor denied by domain of jens.rantil@telavox.se) Received: from [62.109.34.14] (HELO smtp.ilait.se) (62.109.34.14) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 11:04:30 +0000 Received: from ex-hub1.hosting.local (ex-hub1.ilait.se [82.99.18.59]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by smtp.ilait.se (Postfix) with ESMTPS id 7A9012F918 for ; Fri, 16 Sep 2011 11:04:07 +0000 (UTC) Received: from ex-mbx4.hosting.local ([10.46.16.34]) by ex-hub1.hosting.local ([10.46.16.131]) with mapi; Fri, 16 Sep 2011 13:04:07 +0200 From: Jens Rantil To: "dev@couchdb.apache.org" Date: Fri, 16 Sep 2011 13:02:38 +0200 Subject: SV: community of CouchDB developers in the Netherlands Thread-Topic: community of CouchDB developers in the Netherlands Thread-Index: Acx0RlW6azdS9EZQTD2urAXA2q9ybAAGYeYA Message-ID: <850092711C09C042B93EC2F4F2E8B1E70276B1DF29@ex-mbx4.hosting.local> References: In-Reply-To: Accept-Language: en-US, sv-SE Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, sv-SE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Andrey, If you would like to know more about how OTP (gen_servers etc.) work I can = recommend "Erlang and OTP in Action". It gives you a very good introduction= to not just the language Erlang, but also OTP and design philosophies of E= rlang. Regards, Jens -----Ursprungligt meddelande----- Fr=E5n: Andrey Somov [mailto:trophybase@googlemail.com]=20 Skickat: den 16 september 2011 09:57 Till: dev@couchdb.apache.org =C4mne: Re: community of CouchDB developers in the Netherlands Thank you Randall. Even though I have read a lot about the gen_server I still have a lot of d= ifficulties to understand both the big picture and the small details of the= implementation. That is why I was hoping to find someone who can guide me in the very begin= ning. In person it can be so much easier... Apparently, here in the Netherlands Erlang is not that popular. (which is a= lso an indication that it should be impossible to find a job with Erlang) Cheers, Andrey On Thu, Sep 15, 2011 at 6:45 PM, Randall Leeds wro= te: > On Thu, Sep 15, 2011 at 05:38, Andrey Somov >wrote: > > > Thank you very much for your time and efforts. > > It helped me to understand something but for each explanation I got=20 > > 10 > new > > questions :) > > > > Just the first one. > > > > *>> open_async(Server, From, DbName, Filepath, Options) -> > > >> Parent =3D self(), > > >> > > >First, store the current process ID so it can be accessed later on,=20 > > >from > a > > >closure running in another process.* > > > > There is only one couch_server process. It is created like this: > > gen_server:start_link({local, couch_server}, couch_server, [], []). > > > > As far as I understand it means that there is no need to remember=20 > > the process ID (Parent), and instead of gen_server:call( > > Parent, {open_result, DbName, Res, Options}, infinity > > ), > > > > we can use > > > > gen_server:call( > > couch_server, {open_result, DbName, Res, Options}, > infinity > > ), > > > > I have many more but to avoid misunderstanding I would propose to=20 > > stop here. > > I will try to dig further myself. > > When I have specific questions I will try to approach this list. > > > > Thank you ! > > > > Andrey, > > This is exactly right. Although, the 'safer' thing to do which makes=20 > refactoring easy is to use the special constant ?MODULE to refer to=20 > the name of the current module. > More than one way to get things done :) >