CouchDB Proxy Webmachine Resource

Alright, here it is, proof that Webmachine and CouchDB can coexist peacefully: I’ve posted an example Webmachine resource that proxies requests back and forth to a CouchDB instance. (Thanks for the kick, benoitc.)

I dislike the way this blog renders my code, so I’ve decided to start posting my examples on bitbucket, wrapped in a simple Webmachine app, so they’re ready to run. The repo you want is wmexamples.

You’ll find the CouchDB proxy in src/couchdb_proxy.erl.

Watch that repo for other updates. I’ll be going back in the next few days and adding env_resource and some tracing stuff.

About these ads

5 comments so far

  1. pablop on

    Can you please explain the use of ibrowse?
    Erlang couchdb clients I saw uses erlang inets.

    Thanks

  2. Bryan on

    Hi, pablop. inets would work just as well here. I used ibrowse here because that’s what we use at Basho most of the time, so I’m more familiar with it.

    ibrowse comes packaged with couchdb, but if you want the documentation, you’ll have to download the tarball from http://code.google.com/p/erl-ibrowse/

  3. pablop on

    Thank you for your answer.
    From google code it looks like the ibrowse is not very active. I didn’t know it is included in couchdb.

    I’ve just asked justin on twitter about the different files under mywebdemo/src

    A blog post about that will be great.

  4. OJ on

    Hey Bryan,

    Just thought I’d let you know that you can actually embed source files directly from bitbucket into your blog posts. This means that they remain hosted on bitbucket but can still be referenced from your site.

    Check out this simple tutorial for some info.

    Thanks for the Webmachine blogs!
    OJ

    • Bryan on

      Ooo – very nice. Unfortunately, it looks like my instance strips out script tags. :P Thanks for the tip though – it will be useful once I redo things here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: