Expand my Community achievements bar.

SOLVED

Activity Log for User

Avatar

Level 2

Hello,

I need to implement an activity log for my public users, I'm planning to generate a node structure like the following:

/home/users/{APP}/{USER}/log/{YEAR}/{MONTH}/{ACTIVITY NODES}

I would like to check with you if find any drawbacks into this implementation.

And also if there is any way to improve the performance of the queries to "log" child nodes in the structure, like indexes, that you could advice me.

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 8

Depending on how active your users are and how granular your tracking is you might want more directories below the month node (you probably don't want more than a couple hundred child nodes of any one directory. 

You will also want to make sure you account unique node names across publish instances - some kind prefix for different nodes. 

One thing you could do to improve query performance is to create a custom mix-in type that you assign to your activity nodes. That will let you narrow your queries in the most effective manner. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

Depending on how active your users are and how granular your tracking is you might want more directories below the month node (you probably don't want more than a couple hundred child nodes of any one directory. 

You will also want to make sure you account unique node names across publish instances - some kind prefix for different nodes. 

One thing you could do to improve query performance is to create a custom mix-in type that you assign to your activity nodes. That will let you narrow your queries in the most effective manner. 

Avatar

Level 2

orotas wrote...

Depending on how active your users are and how granular your tracking is you might want more directories below the month node (you probably don't want more than a couple hundred child nodes of any one directory. 

You will also want to make sure you account unique node names across publish instances - some kind prefix for different nodes. 

One thing you could do to improve query performance is to create a custom mix-in type that you assign to your activity nodes. That will let you narrow your queries in the most effective manner. 

 

Orotas, Thanks for your help!

Do you have any useful link for the mix-in types used to improve performance ? I don't have experience working with Mix-in types.

Thanks in advance!