Finding groups / clans based on member activity

How would you go about to finding groups based on member activity? Feels like something that would be useful in many games.

For our clan system we’d like to recommend clans to new players that have active members in them.

Any advice on this other than booting up your own microservice for this?

Thanks!

Hello @nixarn_tp,

I see why this would be useful, but the first question is - how would you define “activity”? Is it players that play the game more often within the group? Is it players that interact within the group more often? Is it perhaps a group with more chat activity from its players?

The next question is: how would you track any of these somewhat accurately without creating hot objects that you’re updating all the time?

It’s not really obvious how to create a generic solution that would work equally well for every game, depending on how groups are used - and keeping track of a players activity can put a serious burden on the database.

However, I believe it’s possible to achieve a solution without needing an external service, if activity is tracked sensibly without too much granularity, and using Storage Search to create a dedicated index.

You could, for example, attribute a storage object with a last activity timestamp per group and update this object (without version checking) whenever a user does something you consider to be “activity” (a dedicated or existing RPC, an afterHook to some existing API, etc). However, you’ll need to be very careful to not update the db object too often, especially if your groups are large. You should have some in-memory caching of these activity updates, and flush them (update the storage object) every so often (e.g.: only after some amount of time since the last update). This won’t give you a perfect activity metric, but for suggestions it should be good enough.

You should also be mindful on how you use the Group membership APIs in the above flow, if needed - ideally the client caches the user’s group memberships so you don’t need to list them every time your activity update flow runs, for example.

Finally, you’d use Storage Index Listing and the GetGroups API to suggest groups with “recent activity” in them.

Hope this helps.

We “hacked” this using highscore lists. So player who are active send one activity “score” every day. So got it working that way :slight_smile: Thanks!