Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5953437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:49:33+00:00 2026-05-22T17:49:33+00:00

Couch has a REST interface. This means that data-updates are exclusive to PUT calls.

  • 0

Couch has a REST interface.
This means that data-updates are exclusive to PUT calls.

I’m inspecting ways to implement a humble analyics counters, and came accross the features of couchdb, sofa and couchapp – which are kin’da cool, having in mind my strong JavaScript orientation.

However, most web-analytics servcies end with making count update calls using requesting some resource, usually in an IMG or SCRIPT tag.

  • Is there a way I can use couchApp to
    use GET request to perform my counts?
  • Would that be abuse of the
    architecture? I mean, not everything in couch is REST – i,g, – the administration parts are not.

I’d be very happy to hear what the experts have to say 🙂

** Editted *

I just noted that CouchDB and Sofa are shipped with a Mochiweb web-server!
Maybe there’s a way I could hook on that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:49:34+00:00Added an answer on May 22, 2026 at 5:49 pm

    Fork or plugin idea

    If you are an Erlang programmer (or you’re looking for a new project to learn Erlang), then you definitely can write anything you want as a plugin/extension to CouchDB. The smallest example I know of is Die CouchDB, my proof-of-concept which adds one query that will simply stop the server.

    https://github.com/iriscouch/die_couchdb

    You could in principle write a plugin or fork of CouchDB to handle GET requests and do anything with them.

    Note about REST architecture

    I am not super familiar with analytics implementations, but the point of REST and HTTP is that GET queries have no side-effects and/or are idempotent (running 50 queries is no different from running one).

    The upshot is, proxies can and will cache many GET responses, in both standard and nonstandard ways. That seems incompatible with user tracking and data gathering techniques; however maybe analytics tools still think the benefits outweigh the costs.

    For most people, it’s probably easier to use external tools.

    Log idea

    One trick is to GET anything from Couch, and then check the log entry from couch. You can get the couch log by querying /_log as the admin. The log will show users’ IP address, request path, and any query parameters.

    For example

    $ curl -X GET http://localhost:5984/?userid=abcde\&windowsize=1024x768\&color=blue
    {"couchdb":"Welcome","version":"1.1.0"}
    
    $ curl localhost:5984/_log | grep userid
    [Mon, 23 May 2011 00:34:54 GMT] [info] [<0.1409.0>] 127.0.0.1 - - 'GET' /?userid=abcde&windowsize=1024x768&color=blue 200
    

    Next you can process that log entry and re-insert into your actual analytics database yourself.

    Wrapper idea

    A final solution is to run a simple reverse-proxy which converts your GET requests into whatever you need. NodeJS is getting popular for tasks like that, but you can use any web platform you prefer: PHP, ASP, JSP, whatever you know already.

    You simply respond to the GET request and do whatever you need on the server side, such as inserting the relavant information into your analytics db.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Zend Framework has native Couch DB support? I found only Zend_Couch by Matthew
What is Couch DB? How is that different from conventional oracle DB? What is
Having this code : Models paciente.rb class Paciente include SimplyStored::Couch has_many :consultas end consulta.rb
I have this working regex (tested on regex coach): \n[\s]*[0-9]*[\s]*[0-9]*(\.)?[0-9]*(e\+)?[0-9]* that is supposed to
How to import CSV/TSV data to Couch DB?
I am always sitting on my couch watching tv and surfing the net and
I keep getting a exc bad access error and I think it has something
I have a dillema where our client relations department has been brought in for
The quick overview is this: for my web app I can write most of
I want to perform a LIKE-condition (SQL syntax) in CouchDB. How can this be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.