couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <>
Subject Re: OTP-ification
Date Mon, 08 Jun 2009 23:39:17 GMT
On Jun 8, 2009, at 3:26 PM, Paul Davis wrote:

> On Mon, Jun 8, 2009 at 3:03 PM, Adam Kocoloski<>  
> wrote:
>> On Jun 6, 2009, at 1:06 AM, Paul Davis wrote:
>>> * CouchRep - Ideally, I'd like to keep this in core, but I don't  
>>> know
>>> the logic in it to know if we can split it into an Erlang core  
>>> version
>>> and add an HTTP layer on top. Or something. Anyway, that's all I  
>>> got.
>> The replicator doesn't need an HTTP server, just a client (ibrowse  
>> atm), so
>> it should not have any dependency on a future "CouchHTTPd"  
>> application.  I
>> think I'd still prefer to keep it separate from core, though.
> I meant to layer the protocol so that it could work over Erlang
> message passing or an HTTP protocol, the goal being that core CouchDB
> doesn't require HTTP to work, hence why I pulled replication into its
> own module. I don't actually think we should actually try and make the
> replicator this abstract, I was more just trying to reason out why I
> was putting it outside of the core directory.

Not quite sure I follow your reasoning (are you lumping an HTTP client  
and an HTTP server together as an "HTTP" requirement?), but it's  
tangential.  We both agree that replication code belongs in its own  


>> Regardless of how many applications we use, we could still organize  
>> the code
>> with a multi-level hierarchy like
>> src
>>  |-core
>>   |-couch_db.erl
>>   |-...
>>  |-httpd
>>  |-replication
>>  |-...
>> Adam
> This is possible, but I thought I read that the submodule stuff was
> another one of those "implemented on a whim and not really supported"
> Erlang features.

I think you're referring to packages ( 
) -- that's really a separate issue from how the modules' source code  
is organized on disk.  This isn't Java :-)

The snmp and megaco applications (possibly others) are organized this  
way, with nested folders of source code.  Neither one uses packages.

Thanks for getting the ball rolling on this.  I still prefer to build  
CouchDB as one OTP application, but if the community agrees to split  
it out into lots of smaller ones I won't object.  Best,


View raw message