简体   繁体   中英

Best Practice to log actions in AppEngine

We are making a small download site for software we create on AppEngine. We now would like to track the downloads of each product and are wondering, if there is a preferred way of doing so.

Basically, we have two approaches:

  1. Having a counter Entity for each file (filename, year and month as key) which is increased upon a download.
  2. Logging each action to the database and then have a scheduled task collecting them

Does someone here have experience with either way? Would it be possible to have concurrent requests on the counter Entity (and giving the correct result)? Or would a third way be better?

many thanks in advance for all ideas.

If you only need to count the downloads use a counter, don't bother with an audit trail per download.
Follow the guidelines in sharding counters on how to do it effectively on the App engine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM