Hi Miles,

CouchDB's internals are pretty complex for an example of how the Erlang
actor model works.
CouchDB follows the typical erlang design of using `gen_servers`, ETS and
other parts of OTP manage this all correctly.
So a simple start is to search the code base for `gen_server`. Each
gen_server will have a lot going on internally
as they are often managing multiple processes, file pointers etc. So it
doesn't always make for easy reading.

Other contributors can correct me on this, but I feel the way we use the
core erlang actor model is pretty generic to how
most erlang codebases would work. It's the distributed database management
on top of that which is more complex.

Oh, another thing to look at is the fabric layer. In 3.x this is the layer
that receives a user request and then connects
the nodes that can handle the request.

Cheers
Garren







On Thu, Oct 14, 2021 at 7:03 PM Miles Fidelman <[email protected]>
wrote:

> Hi Folks,
>
> Can anybody point me at a good presentation on the internals of couchdb?
>
> I'm really interested in how couch makes use of erlang's actor model.
>
> I've done a lot of googling, and can't seem to find a "theory of
> operations" or architectural overview.  Perhaps someone here knows of one?
>
> Thanks very much,
>
> Miles Fidelman
>
> --
> In theory, there is no difference between theory and practice.
> In practice, there is.  .... Yogi Berra
>
> Theory is when you know everything but nothing works.
> Practice is when everything works but no one knows why.
> In our lab, theory and practice are combined:
> nothing works and no one knows why.  ... unknown
>
>

Reply via email to