You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "lpil (via GitHub)" <gi...@apache.org> on 2024/09/04 21:45:52 UTC

[I] Embed CouchDB into another BEAM application [couchdb]

lpil opened a new issue, #5218:
URL: https://github.com/apache/couchdb/issues/5218

   Hello friends. Thank you for this wonderful software, I'm really enjoying learning it and am excited for the production problems it can solve for me.
   
   ## Summary
   
   I'm a user of BEAM languages such as [Gleam](https://github.com/gleam-lang/gleam/) and Erlang.
   
   Seeing as my applications and CouchDB run on the same virtual machine I was wondering if it would be possible to run them in the same virtual machine instance and talk over a functional or message based API.
   
   ## Desired Behaviour
   
   I am able to add CouchDB to my Gleam/Erlang/Elixir etc programs and communicate with it directly from my program within the same VM instance.
   
   ## Additional context
   My goals would be to save on operational overhead, as well as saving on resource usage and removing HTTP overhead as secondary goals.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Embed CouchDB into another BEAM application [couchdb]

Posted by "lpil (via GitHub)" <gi...@apache.org>.
lpil closed issue #5218: Embed CouchDB into another BEAM application
URL: https://github.com/apache/couchdb/issues/5218


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Embed CouchDB into another BEAM application [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5218:
URL: https://github.com/apache/couchdb/issues/5218#issuecomment-2332123924

   Agree with nick that couchdb's interface is the http api, going below that is not supported or documented.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Embed CouchDB into another BEAM application [couchdb]

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on issue #5218:
URL: https://github.com/apache/couchdb/issues/5218#issuecomment-2331949173

   Hi @lpil, thanks for stopping by. 
   
   As-is CouchDB is not structured to be used as a dependency in an Erlang project. In rebar3-parlance it would be considered an `umbrella` project: https://rebar3.org/docs/workflow/
   
   But with a bit of work it could be doable to integrate with it. All the applications in CouchDB are just standard Erlang apps located in the `./src` directory. We use rebar for compiling them (still rebar2 though, not rebar3).  So at the very least it should be possible to take all the src/* apps and add your apps alongside them, then adjust reltool to build the release including all the CouchDB apps and your apps. 
   
   `chttpd` is sort of the top level API layer listening the request.`fabric` is the clustering layer, in charge of dispatching request to individual workers/shards on other nodes. And `couch` the app handling opening file handles. Each of those have associated helper apps and libraries. For example, you could integrate at the fabric layer, so you'd skip serializing and/deserializing to/from json. Or, if you don't need clustering and sharding, you can use the couch app directly to open local couch files (similar to how CouchDB 1.x worked).
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Embed CouchDB into another BEAM application [couchdb]

Posted by "lpil (via GitHub)" <gi...@apache.org>.
lpil commented on issue #5218:
URL: https://github.com/apache/couchdb/issues/5218#issuecomment-2332120796

   Great to know, thank you. I think for my use this is not quite as practical so I'll continue to use the HTTP API.
   
   Cheers!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org