Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GetStream and activity feeds

Tags:

getstream-io

I have an existing notification feed, but I'm looking at possibly migrating over to GetStream.

Currently, I'm using Laravel Notifications, to notify users and other objects.

I currently have something like the following:

1) Users 2) Groups 3) Group Members

So, when I CRUD a group, I simply notify all members of the group and also the group ($group->notifications returns a collection), which works fine.

Looking through the GetStream docs though, it seems there is a concept of 'followers'.

Does this mean, that all members of a group need to be followers of each other to see all notifications?

What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?

So, If I Person A and Person B are members of Group 1, When Person A saves Group 1, I'd like Person A, to see something like:

You saved Group 1

and Person B will see:

Person A saved Group 1

When I view the Group page, I'd like to pull in the activities that have happened to that Group.

Is this possible?

Thanks

like image 806
sipher_z Avatar asked Oct 17 '22 12:10

sipher_z


1 Answers

Does this mean, that all members of a group need to be followers of each other to see all notifications?

Probably not. Stream allows you setup feed groups, following relationships, and use "targeting" to send activities to different feeds.

Based on the use case you described, you're probably best off with two Feed Groups, e.g. group and user_timeline. You can give each user their own user timeline feed and set it to follow other group feeds as appropriate.

When a user does something involving the group, an activity can be added to the group feed. This activity then propagates out to all users who follow the group.

What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?

You can always create multiple feed groups for a given app. The example with two groups is probably sufficient for your use case but you could go further with 3 groups...

  • user: User events posted to this feed. This feed will handle specific and non-group specific activities. If the activity relates to a group, the "to" field can be populated with the group feed name and this will cause the activities to be copied to that feed (and in turn propagated to it's followers).
  • user_timeline: Retrieved by users. Follows group feeds. User's may also follow another user's user_timeline feed in order to receive all events by that user (e.g. an asymmetrical follow like Twitter / or symmetrical follow like Facebook)
  • group: Receives user generated activities via the 'to' targetting. System/admin generated activities may also be add directly to the feed.
like image 140
Dwight Gunning Avatar answered Oct 21 '22 03:10

Dwight Gunning