What are smart / handy things to log /statistics for a social networking site? Things i came up with:
什么是智能/方便的事情来记录/统计社交网站?我提出的事情:
- user logins (timestamp + user id)
- failed user logins (timestamp + user id)
- number of messages/user (timestamp + userid
- table of active users (timestamp + user id)
- time user spent on page (delta timestamp + userid + pageid
- table of users page views (user/page pair)
用户登录(时间戳+用户ID)
用户登录失败(时间戳+用户ID)
消息/用户数(时间戳+用户ID
活跃用户表(时间戳+用户ID)
用户在页面上花费的时间(delta timestamp + userid + pageid
用户页面视图表(用户/页面对)
Things I missed?
我错过了什么?
Considering i'm using Cassandra (=nosql) what would be the fastest and most scalable way? Im thinking of adding the login attempts to the user keyspace and creating an logging keyspace for time on page etc.
考虑到我使用的是Cassandra(= nosql),哪种方式最快,最具扩展性?我想将登录尝试添加到用户键空间并为页面上的时间创建日志记录键空间等。
Is there something like an opensource version of google analytics written in php? If I expand that with the data mentioned above + this (demo@bottom here) = killer app
是否有像用PHP编写的谷歌分析的开源版本?如果我用上面提到的数据扩展它+这个(这里是demo @ bottom)=杀手app
5 个解决方案
#1
2
It might be a good thing to log log_type
记录log_type可能是件好事
Like DEBUG, INFO, ERROR, etc
像DEBUG,INFO,ERROR等
#2
#3
0
Have you tried approach defined here ? It's a multi-threaded (and synchronized) logger-2-files. I guess this is the fastest logging method possible on standard PHP server.
你试过这里定义的方法吗?它是一个多线程(和同步)logger-2文件。我想这是标准PHP服务器上最快的日志记录方法。
#4
0
As you're asking "what" you should store, not "how" to store it, I'd say you are asking the wrong people. You need to work out what your business requirements are, and how to support them - storing data because it might be "handy" is likely to create a complex app with lots of maintenance trouble, not to mention performance pain.
当你问“你应该存储什么”,而不是“如何”存储它时,我会说你问的是错误的人。您需要弄清楚您的业务需求是什么,以及如何支持它们 - 存储数据因为它可能“方便”可能会创建一个复杂的应用程序,有很多维护问题,更不用说性能上的痛苦。
Having said that, within social networks, the connection between people is really important (duh), so I'd consider explicitly storing that in your logs as well. "User x viewed user y's wall"; "User x sent a message to user y" etc. That way, you can answer questions like "how often did user x send a message to user y between a and b dates?".
话虽如此,在社交网络中,人与人之间的联系非常重要(duh),所以我也考虑将其明确地存储在你的日志中。 “用户x查看了用户y的墙”; “用户x向用户y发送了一条消息”等。这样,您可以回答诸如“用户x在a和b日期之间向用户y发送消息的频率是多少?”之类的问题。
#5
0
To answer your question regarding an "open source Google Analytics in PHP":
要回答有关“PHP中的开源Google Analytics”的问题,请执行以下操作:
check out piwik.org!
看看piwik.org!
#1
2
It might be a good thing to log log_type
记录log_type可能是件好事
Like DEBUG, INFO, ERROR, etc
像DEBUG,INFO,ERROR等
#2
0
For storing statistics in cassandra, look at twitters rainbird as a good example of how to use counters which are new in cassandra 0.8.
要在cassandra中存储统计数据,请查看twitters rainbird作为如何使用cassandra 0.8中新增计数器的一个很好的示例。
#3
0
Have you tried approach defined here ? It's a multi-threaded (and synchronized) logger-2-files. I guess this is the fastest logging method possible on standard PHP server.
你试过这里定义的方法吗?它是一个多线程(和同步)logger-2文件。我想这是标准PHP服务器上最快的日志记录方法。
#4
0
As you're asking "what" you should store, not "how" to store it, I'd say you are asking the wrong people. You need to work out what your business requirements are, and how to support them - storing data because it might be "handy" is likely to create a complex app with lots of maintenance trouble, not to mention performance pain.
当你问“你应该存储什么”,而不是“如何”存储它时,我会说你问的是错误的人。您需要弄清楚您的业务需求是什么,以及如何支持它们 - 存储数据因为它可能“方便”可能会创建一个复杂的应用程序,有很多维护问题,更不用说性能上的痛苦。
Having said that, within social networks, the connection between people is really important (duh), so I'd consider explicitly storing that in your logs as well. "User x viewed user y's wall"; "User x sent a message to user y" etc. That way, you can answer questions like "how often did user x send a message to user y between a and b dates?".
话虽如此,在社交网络中,人与人之间的联系非常重要(duh),所以我也考虑将其明确地存储在你的日志中。 “用户x查看了用户y的墙”; “用户x向用户y发送了一条消息”等。这样,您可以回答诸如“用户x在a和b日期之间向用户y发送消息的频率是多少?”之类的问题。
#5
0
To answer your question regarding an "open source Google Analytics in PHP":
要回答有关“PHP中的开源Google Analytics”的问题,请执行以下操作:
check out piwik.org!
看看piwik.org!