CouchDB
  1. CouchDB
  2. COUCHDB-1355

split code & create couch_httpd application

    Details

    • Type: Improvement Improvement
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Labels:
      None
    • Skill Level:
      Committers Level (Medium to Hard)

      Description

      Couchdb is still to monolithic. This tcicket track changes to extract CouchDB HTTP API as a full application.

        Issue Links

          Activity

          Hide
          Paul Joseph Davis added a comment -

          Commencing brain dump review:

          0001

          • src/Makefile.am indentation looks wrong for src/couch_httpd
          • include files is empty, but this might change in the next patch so just a note to self
          • We do a thing for couch.app.src in couchdb so we can set the module list automatically. Should we duplicate that here?
          • couch_httpd.app is missing the module to start the app

          0002

          • Yep, record moved. Looks good.
          • Whitespace only hunk at the bottom of 0002

          0003

          • I'm not entirely certain about this patch. What's the circular dependency? If it's just records in include files I don't think I'd bother making the split as it seems a bit awkward.
          • The couch_changes.app reminds me we should be listing dependencies better as we do this. Not super urgent but a thing to think about.

          This also brings up how we want to handle things like the httpd code for views. If anyone has good ideas we should open a ticket and discuss a plan of some sort on how to handle this going forward. I'm thinking specifically that the couch_httpd is separate from couch, but couch_changes and couch_mrview have their httpd code in those apps.

          Show
          Paul Joseph Davis added a comment - Commencing brain dump review: 0001 src/Makefile.am indentation looks wrong for src/couch_httpd include files is empty, but this might change in the next patch so just a note to self We do a thing for couch.app.src in couchdb so we can set the module list automatically. Should we duplicate that here? couch_httpd.app is missing the module to start the app 0002 Yep, record moved. Looks good. Whitespace only hunk at the bottom of 0002 0003 I'm not entirely certain about this patch. What's the circular dependency? If it's just records in include files I don't think I'd bother making the split as it seems a bit awkward. The couch_changes.app reminds me we should be listing dependencies better as we do this. Not super urgent but a thing to think about. This also brings up how we want to handle things like the httpd code for views. If anyone has good ideas we should open a ticket and discuss a plan of some sort on how to handle this going forward. I'm thinking specifically that the couch_httpd is separate from couch, but couch_changes and couch_mrview have their httpd code in those apps.
          Hide
          Paul Joseph Davis added a comment -

          I'll try and get a review of this done today. I skimmed and didn't see anything major but I want to go over some of the build stuff and startup in a bit more detail before I can comment more thoroughly.

          Show
          Paul Joseph Davis added a comment - I'll try and get a review of this done today. I skimmed and didn't see anything major but I want to go over some of the build stuff and startup in a bit more detail before I can comment more thoroughly.
          Hide
          Benoit Chesneau added a comment -

          bump

          Show
          Benoit Chesneau added a comment - bump
          Hide
          Benoit Chesneau added a comment -

          I posted changes on my github repository in the couch_httpd branch :

          https://github.com/benoitc/couchdb/compare/master...couch_httpd

          Show
          Benoit Chesneau added a comment - I posted changes on my github repository in the couch_httpd branch : https://github.com/benoitc/couchdb/compare/master...couch_httpd
          Hide
          Benoit Chesneau added a comment - - edited

          Attached are 3 patches to extract the HTTP api as in its own folder/app.

          First patch [0001] is moving couch_httpd* in their own application named couch_httpd and make sure tests still pass.

          Second [0002] is moving #httpd record in couch_httpd/include/couch_httpd.hrl instead having it in couch_db.hrl.

          The third [0003] one create a couch_changes applications (extracting couch changes API from couchdb & couch_httpd applications to remove any circular dependancies and make sure couchdb doesn't use #httpd record. Also by doing this it allows to manage couch_changes API more consistant and usable by other couchdb applications.

          All tests pass.

          Show
          Benoit Chesneau added a comment - - edited Attached are 3 patches to extract the HTTP api as in its own folder/app. First patch [0001] is moving couch_httpd* in their own application named couch_httpd and make sure tests still pass. Second [0002] is moving #httpd record in couch_httpd/include/couch_httpd.hrl instead having it in couch_db.hrl. The third [0003] one create a couch_changes applications (extracting couch changes API from couchdb & couch_httpd applications to remove any circular dependancies and make sure couchdb doesn't use #httpd record. Also by doing this it allows to manage couch_changes API more consistant and usable by other couchdb applications. All tests pass.

            People

            • Assignee:
              Benoit Chesneau
              Reporter:
              Benoit Chesneau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development