Hi Dirkjan,
when I see the code like the one below (couch_server) I realize that I do
not understand the complete picture.
I do not get what is linked with what at the end.
I am wondering if someone can go through the code and explain it line by
line.
And I have severe difficulties to organize a working Erlang environment.
Do you have plans to attend any local conference in the nearest future ? (by
the way I live in Den Haag)
open_async(Server, From, DbName, Filepath, Options) ->
Parent = self(),
Opener = spawn_link(fun() ->
Res = couch_db:start_link(DbName, Filepath, Options),
gen_server:call(
Parent, {open_result, DbName, Res, Options}, infinity
),
unlink(Parent),
case Res of
{ok, DbReader} ->
unlink(DbReader);
_ ->
ok
end
end),
true = ets:insert(couch_dbs_by_name, {DbName, {opening, Opener,
[From]}}),
true = ets:insert(couch_dbs_by_pid, {Opener, DbName}),
DbsOpen = case lists:member(sys_db, Options) of
true ->
true = ets:insert(couch_sys_dbs, {DbName, true}),
Server#server.dbs_open;
false ->
Server#server.dbs_open + 1
end,
Server#server{dbs_open = DbsOpen}.
On Wed, Sep 14, 2011 at 7:01 PM, Dirkjan Ochtman <[email protected]> wrote:
> On Wed, Sep 14, 2011 at 18:54, Andrey Somov <[email protected]>
> wrote:
> > I would be happy to join a meetup of CouchDB developers.
> > Googling did not help to find either CouchDB or Erlang community here in
> the
> > Netherlands. Can someone help me ? Is there one ?
>
> There are a few Dutchies involved with CouchDB, but I don't think
> there's been much actual contribution in terms of Erlang code. AFAIK,
> most of us just use CouchDB in one way or another (or help out around
> the edges; couchdb-python, paisley, Futon).
>
> Cheers,
>
> Dirkjan
>