Opened 13 years ago

Last modified 8 years ago

#267 accepted enhancement

counter to display access of media (showing the number of views)

Reported by: Erkan Yilmaz Owned by:
Priority: minor Milestone:
Component: programming Keywords: parity-youtube, parity-deviantart, parity-flickr
Cc: molgrum Parent Tickets:

Description (last modified by Elrond)

what I missed - as new user to mediagoblin:

a counter how often the media was accessed
(though that could be done with a external counter also)



Change History (9)

comment:1 by Elrond, 13 years ago

Component: Programming
Setting to 2 hours work (so it shows up in the simple issues list).
The things to do are:


-  Create a migration to add the needed field (copy'n'change job)
-  Show the value on the media page (get in touch with our designer
   maybe?)
-  Increase the value by one on each display (this one is a bit
   tricky, because it should use an atomic update on the db server)

If one person looks over and over again at the same picture, it
could be discussed, if this should always increase the counter. If
not, the programming job is a lot harder.



comment:2 by Christopher Allan Webber, 13 years ago

You may be surprised to hear that for once doing an atomic update
of integers this isn't too hard with MongoDB ;)

`http://www.mongodb.org/display/DOCS/Updating#Updating-%24inc <http://www.mongodb.org/display/DOCS/Updating#Updating-$inc>`_

The harder part here will be deciding when to update. We might not
want to update this integer if a bot is hammering the site or if
someone keeps refreshing 5 times in the same hour. Would we want to
maybe keep some sort of record either in the cache, or maybe in a
small-sized mongodb capped collection so we know whether or not
it's appropriate to update the number? Am I making things too
complex by discussing this? :)



comment:3 by Will Kahn-Greene, 12 years ago

The original url for this bug was http://bugs.foocorp.net/issues/603 .
Relations:
#334: duplicated

comment:4 by Aleksej, 12 years ago

Milestone: 0.2.2
Summary: counter to display access of mediacounter to display access of media (showing the number of views)

comment:5 by Aleksej, 12 years ago

Milestone: 0.2.2

comment:6 by Aleksej, 12 years ago

Keywords: parity-youtube parity-deviantart parity-flickr added

comment:7 by Elrond, 11 years ago

Description: modified (diff)

Small update:

This issue currently probably depends on #595 and #596.

comment:8 by Aleksej, 10 years ago

Type: defectenhancement

comment:9 by Ben Sturmfels, 8 years ago

Cc: molgrum added

CC'ing Molgrum in from duplicate ticket #5337.

Note: See TracTickets for help on using tickets.