You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Martin S (JIRA)" <ji...@apache.org> on 2009/01/20 06:46:59 UTC

[jira] Created: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Make couchdb adhere more to OTP guidelines
------------------------------------------

                 Key: COUCHDB-216
                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
             Project: CouchDB
          Issue Type: Improvement
            Reporter: Martin S


CouchDB could adhere to otp standards in a better way. 
Currently we have:
- couch.app is not uptodate
- couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".

>From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748845#action_12748845 ] 

Adam Kocoloski commented on COUCHDB-216:
----------------------------------------

Hmm, some folks might be packaging CouchDB as part of an Erlang release, in which case they'll be aware of the Erlang version issue.  I know at least one person who does this :-)

I think maintaining the .app file is generally a sign of good behavior.  That said, if we're committed to not maintaining it we should remove it from the distribution.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Martin S (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin S closed COUCHDB-216.
----------------------------

    Resolution: Fixed

jan___ / #couchdb told me that the release-file way of starting would break things on erlang upgrade. 

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748860#action_12748860 ] 

Paul Joseph Davis commented on COUCHDB-216:
-------------------------------------------

I'd agree that people doing releases are probably advanced enough to know what they're getting into. Unless someone can figure out a sane way to make releases work, I don't think its something we should worry too much about.

To me, removing the .app file is unacceptable. The fact that its broken is just a reminder that we've been Doing It Wrong and should fix things, not break them even further.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749315#action_12749315 ] 

Paul Joseph Davis commented on COUCHDB-216:
-------------------------------------------

There are quite a few Erlang tools that require the .app file to be present. Things like application:start(couchdb) require it. I'm pretty sure appmon requires it. It may seem unimportant but it breaks a whole bunch of things. Consider not having a .app file like not having a setup.py in a distributed Python module.

The .rel stuff I think is orthogonal to making a package for Debian. From what I've read about Erlang's release tools, it seems like they were designed for pushing packages to a homogenous environment for hot code upgrades and the like. As you saw, that kinda breaks down in a Debian style distribution environment.

Bottom line, the .rel is unimportant, but the .app is quite important.



> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743921#action_12743921 ] 

Robert Newson commented on COUCHDB-216:
---------------------------------------


Consider making couchdb sufficiently OTP-like to support zero time 'hot' upgrades between releases.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749318#action_12749318 ] 

Paul Joseph Davis commented on COUCHDB-216:
-------------------------------------------

This patch breaks ./utils/run because of the use of ERL_LIBS now which is incompatible with how our source directory is setup. Quickest fix I can think of would be to get a copy of the old couchdb.tpl.in and use that for the utils/run. Longer term when we get around to cleaning up the tree we can revert back to using couchdb.tpl

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749316#action_12749316 ] 

Adam Kocoloski commented on COUCHDB-216:
----------------------------------------

Thanks Robert, hopefully fixed in r809407



> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Martin S (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin S updated COUCHDB-216:
-----------------------------

    Attachment: 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch
                0002-add-missing-registered-process-names.patch
                0001-add-couch_app-and-couch_sup.patch

The three patches was created by GIT and should apply cleanly onto github's couchdb as of 76b1dd9bffe80eeabe5135c170f6d9527cf1e4f1 / http://svn.apache.org/repos/asf/couchdb/trunk@735875.

The same changes are part of branch merge/otp at http://github.com/zeitgeist/couchdb.



> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748844#action_12748844 ] 

Paul Joseph Davis commented on COUCHDB-216:
-------------------------------------------

Noah,

I think you mean the rel file. The app file is a description of the application and isn't tied to the Erlang VM. I don't have any experience with Erlang's release tools, but I'd agree that if it binds to a specific VM then at most we should just provide a non-standard make target to produce a release.

Keeping the app file up to date *is* a priority as it's used for other things like detecting conflicting registered processes.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749296#action_12749296 ] 

Adam Kocoloski commented on COUCHDB-216:
----------------------------------------

Mark, can you take a look and see how badly I broke the Windows build with this patch?  I updated couchdb.bat.tpl.in but I don't know if the build system actually loads the correct paths into the .app file on Windows.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749299#action_12749299 ] 

Noah Slater commented on COUCHDB-216:
-------------------------------------

"I think you mean the rel file."

Yes, I did.

"Keeping the app file up to date *is* a priority as it's used for other things like detecting conflicting registered processes."

Really does it do anything concrete for us? It seems like a very silly and pointless file to me.

"Hmm, some folks might be packaging CouchDB as part of an Erlang release, in which case they'll be aware of the Erlang version issue."

I was packaging CouchDB as part of the Debian Erlang packages, and unless you tie the CouchDB package to a specific version of the Erlang package, and update them in tandem, you're hosed.

"To me, removing the .app file is unacceptable. The fact that its broken is just a reminder that we've been Doing It Wrong and should fix things, not break them even further."

The fact that we've only just noticed should indicate that it probably doesn't matter.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749298#action_12749298 ] 

Robert Newson commented on COUCHDB-216:
---------------------------------------

broken on Ubuntu as basename doesn't accept -s

from src/couchdb/Makefile.am

couch.app: couch.app.tpl
        modules=`find . -name "*.erl" -exec basename -s .erl {} \; | tr '\n' ',' | sed "s/,$$//"`; \
 

basename: invalid option -- 's'
Try `basename --help' for more information.


> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Kocoloski updated COUCHDB-216:
-----------------------------------

    Attachment: couch_startup_refactor.patch

Here's an updated patch inspired by Martin's and Ben's work.  It stops short using a boot file to start CouchDB; hopefully that allays some of Jan's concerns regarding a build surviving an Erlang VM upgrade.  Highlights:

- remove application behavior from couch_server and add it to couch_app instead
- starts/stops the server using OTP application controls
- couch.erl convenience module exports start(), stop(), restart(), reload()
- modules list in couch.app auto-generated using Ben's scary sed command
- server startup command in shell script is *much* simpler now

I don't know if anyone was using couch_server:dev_start(), but I tried to update that correctly, too.

Finally, I dropped `icu-config --invoke` from the startup command.  In my experience couch finds the ICU libraries just fine without it, and it causes serious problems on Mac OS X when MacPorts is used to satisfy dependencies.  In particular, it utterly breaks couchdb-lucene.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748839#action_12748839 ] 

Noah Slater commented on COUCHDB-216:
-------------------------------------

There is no point updating the app file until Erlang has a way of not breaking applications on upgrade.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-216:
--------------------------------------

    Skill Level: Committers Level (Medium to Hard)

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, couch_startup_refactor.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Ben Browning (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Browning updated COUCHDB-216:
---------------------------------

    Attachment: 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch


The modules section of couch.app was outdated. Instead of updating it manually, I've modified the Makefile to populate this based on the modules actually present when building. This should keep it from getting out of date in the future.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Anderson reopened COUCHDB-216:
------------------------------------


It's generally agreed that we should make CouchDB more OTP-like. 

I'm not sure about the implementation or the timeline for doing it, but I think it's the best path to auto-sharding.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-216) Make couchdb adhere more to OTP guidelines

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-216:
--------------------------------------

    Attachment: rearrange.tar.gz

This tarball includes a script and a patch to update the CouchDB source tree fairly extensively. Among the important bits:

The root directory now follows the: "src, ebin, priv, include" structure. The dependencies are pushed into a deps directory and each dependency gets the "src/ebin/include" treatement.

the main CouchDB source directory has been split into a handful of directories to start organizing the modules by related functionality. This pattern is copied from the monaco application in the stdlib.

couchspawnkillable and couchjs are now in priv/bin. couchjs still gets its /usr/local/bin script.

couch_erl_driver is in priv/lib where it should be. I think we should be able to even remove the paths when loading this, but again I'd want to double check on whether someone might have a reason for installing this elsewhere.

I started building beam files with a call to make:all() within Erlang. This actually builds stuff quite a bit faster and so far is pretty useful. That said it kind of doesn't fit into the Autotools process because it never rebuilds beam files on change because the call is never triggered because I couldn't figure out how to add the proper dependency.

Also, there's a weirdness in that I symlink deps/couch to the root directory so that ./utils/run can work with ERL_LIBS instead of four specifications of -pa.

Anyway, this is an initial layout.

> Make couchdb adhere more to OTP guidelines
> ------------------------------------------
>
>                 Key: COUCHDB-216
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-216
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Martin S
>         Attachments: 0001-add-couch_app-and-couch_sup.patch, 0001-Generate-the-modules-section-of-couch.app-via-the-Ma.patch, 0002-add-missing-registered-process-names.patch, 0003-make-couchdb-startup-script-use-couch.rel.-load-conf.patch, rearrange.tar.gz
>
>
> CouchDB could adhere to otp standards in a better way. 
> Currently we have:
> - couch.app is not uptodate
> - couch_server.erl is an amalgam of 2 behaviours, which is considered being "not good".
> From my beginner's perception of OTP, it seems CouchDB is not treated as a running application when it is actually running. E.g. appmon doesn't show the application once CouchDB is started. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.