You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Ido Ran <id...@gmail.com> on 2010/12/08 22:56:47 UTC

Anonymous Identity

Hi,
I have an application which show album of photos (this is new).
I would like to keep track of how many people view each album.
If I allow anyone to change the document of the album the data will not
worth anything.

How can I ensure that client side code does not do bad stuff?

I though that CouchDB HTTP module must keep track on HTTP session even if
the client does not authenticate. Can I get hold on the session in some way
to at least validate that the same session does not change document in short
period of time?

Thank you,
Ido

Re: Anonymous Identity

Posted by Ido Ran <id...@gmail.com>.
Thanks for sharing.

I guess another option, for statistics only, is to use Google Analytics but
I'm not sure I am able to programmatically query it without authenticating
(anonymously).

Ido

On Tue, Dec 21, 2010 at 3:58 PM, Jason Smith <jh...@couchone.com> wrote:

> On Tue, Dec 14, 2010 at 2:53 AM, Ido Ran <id...@gmail.com> wrote:
> > The nice thing about CouchDB and CouchApp is that I am able to run my app
> > right from CouchDB.
>
> You can say that again!
>
> I have exactly the same problem as you. I have two thoughts:
>
> 1. You can query your couch logs by hitting (as admin) /_logs. I often
> query /_logs?bytes=10000. You will at least see all the queries your
> couch served, including read-only and anonymous GETs.
>
> 2. That is only a stopgap. However as a person responsible for many
> couches, I say the logging situation is not good enough and I am
> hopeful to see great improvements in that area in the future.
>
> --
> Jason Smith
> CouchOne Hosting
>

Re: Anonymous Identity

Posted by Jason Smith <jh...@couchone.com>.
On Tue, Dec 14, 2010 at 2:53 AM, Ido Ran <id...@gmail.com> wrote:
> The nice thing about CouchDB and CouchApp is that I am able to run my app
> right from CouchDB.

You can say that again!

I have exactly the same problem as you. I have two thoughts:

1. You can query your couch logs by hitting (as admin) /_logs. I often
query /_logs?bytes=10000. You will at least see all the queries your
couch served, including read-only and anonymous GETs.

2. That is only a stopgap. However as a person responsible for many
couches, I say the logging situation is not good enough and I am
hopeful to see great improvements in that area in the future.

-- 
Jason Smith
CouchOne Hosting

Re: Anonymous Identity

Posted by Ido Ran <id...@gmail.com>.
Hi,
Thanks for the answer.
I'm not familiar with Sinatra or the other frameworks, but I have a question
about this.
The nice thing about CouchDB and CouchApp is that I am able to run my app
right from CouchDB. Is it possible to use any of those frameworks from
couchone.com account?

My guess is no but I am asking.

Thank you,
Ido

On Thu, Dec 9, 2010 at 5:18 PM, Zachary Zolton <za...@gmail.com>wrote:

> HTTP is a stateless protocol, but many application servers emulate a
> session by keeping an in-memory data structure that is keyed off of a
> browser cookie. CouchDB doesn't do this.
>
> I think the easiest way for you to have an anonymous session like that
> would be to put CouchDB behind some kind of application server, e.g.
> PHP, Sinatra, Express.
>
> Cheers,
> Zach
>
> On Wed, Dec 8, 2010 at 3:56 PM, Ido Ran <id...@gmail.com> wrote:
> > Hi,
> > I have an application which show album of photos (this is new).
> > I would like to keep track of how many people view each album.
> > If I allow anyone to change the document of the album the data will not
> > worth anything.
> >
> > How can I ensure that client side code does not do bad stuff?
> >
> > I though that CouchDB HTTP module must keep track on HTTP session even if
> > the client does not authenticate. Can I get hold on the session in some
> way
> > to at least validate that the same session does not change document in
> short
> > period of time?
> >
> > Thank you,
> > Ido
> >
>

Re: Anonymous Identity

Posted by Zachary Zolton <za...@gmail.com>.
HTTP is a stateless protocol, but many application servers emulate a
session by keeping an in-memory data structure that is keyed off of a
browser cookie. CouchDB doesn't do this.

I think the easiest way for you to have an anonymous session like that
would be to put CouchDB behind some kind of application server, e.g.
PHP, Sinatra, Express.

Cheers,
Zach

On Wed, Dec 8, 2010 at 3:56 PM, Ido Ran <id...@gmail.com> wrote:
> Hi,
> I have an application which show album of photos (this is new).
> I would like to keep track of how many people view each album.
> If I allow anyone to change the document of the album the data will not
> worth anything.
>
> How can I ensure that client side code does not do bad stuff?
>
> I though that CouchDB HTTP module must keep track on HTTP session even if
> the client does not authenticate. Can I get hold on the session in some way
> to at least validate that the same session does not change document in short
> period of time?
>
> Thank you,
> Ido
>