Opened 8 years ago

Last modified 3 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)



Subtickets

Change History (9)

comment:1 Changed 8 years ago by Elrond

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 Changed 8 years ago by Christopher Allan Webber

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 Changed 8 years ago by Will Kahn-Greene

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

comment:4 Changed 8 years ago by Aleksej

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

comment:5 Changed 8 years ago by Aleksej

Milestone: 0.2.2

comment:6 Changed 7 years ago by Aleksej

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

comment:7 Changed 7 years ago by Elrond

Description: modified (diff)

Small update:

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

comment:8 Changed 6 years ago by Aleksej

Type: defectenhancement

comment:9 Changed 3 years ago by Ben Sturmfels

Cc: molgrum added

CC'ing Molgrum in from duplicate ticket #5337.

Note: See TracTickets for help on using tickets.