I have a java application. My application has ‘n’ number of users with 3 type of roles (r1, r2 and r3). I need user’s daily usage report. In other words, I need to find user count (by role) who are using my application daily.
I need user count in daily basis as,
users of role1 – 456,
users of role2 – 3463 etc..
How can I do this. I am planning to store users login date in a separate table. So that I can get the users count easily by date. But storage space required for these data in database may be too high.
Can anyone suggest me whether the above process is an efficient way or is there any predefined (opensource or paid) tools to track user counts (by role) and activities. Or is there any other efficient way?
Your idea is good. If all that you need is user logged-in count that’s good. I think that keeping logs when user logged-in is good. I understand that you don’t need to track activities. You can keep data in a table with user login, sign-in date etc. If data gets too large use non-relatonal database like MongoDB or aggregate data for last month/year etc. I mean to create aggregated rows like
(day:2012-08-02, role:Role1, count:123),(day:2012-08-02, role:role2, count:453)etc. Just keep counts of role for each day and delete ‘raw’ data.