0

I am trying to figure out a situation using GetStream.IO but I am having issues while doing it...

I have an app and I want 3 different feeds:

  • User one (With all my activities if mine, or with all the activities of a given user)
  • Timeline TypeA (Based on the aggregation of user's TypeA activities I follow)
  • Timeline TypeB (Based on the aggregation of user's TypeB activities I follow)

I also need an activity one (X posted, Y followed you, etc) but for now I would like to focus on the situation above.

User A arrives in the App. He has two feeds

  • Feed with users typeA
  • Feed with users typeB

However, both type A and B are basically users (from inheritance pov). If I follow an user (through getstream IO), the aggregation will return me the results (activities) from both typeA/B users I follow, which I don't want to.

How could I solve this? (using getstreamIO only if possible)

Thanks

Emixam23
  • 3,854
  • 8
  • 50
  • 107

1 Answers1

1

Since there is no filtering while pulling activities in a feed, classification should be done in feed group level. Important idea is to split user feed such that

user_a:user_id and user_b:user_id then user:user_id feed can follow these two feeds.

On top, timelines can follow their own kinds such that

timeline_a:user_id follows user_a:user_id and aggregates it, similarly timeline_b:user_id follows user_b:user_id where each timeline see activities for their interested ones.

If user wants to see whole aggregation, timeline:user_id could also be provided.

ferhatelmas
  • 3,818
  • 1
  • 21
  • 25
  • Thanks for your answer. Ok alright.. I don't understand :( Do you mind adding some examples/links to the documentation API? I need to sort it out to make sure 100% we can use this solution :) – Emixam23 Apr 15 '20 at 18:44
  • Default feed groups (`user`, `timeline`, `timeline_aggregated`, etc.) are there for your convenience but you can create new ones as you wish. This is clear, right? – ferhatelmas Apr 15 '20 at 18:58
  • Hmm I just don't get what are these "group". I think I can understand what you said above, but I don't get timelines following other timelines. To me, the way it works on streamIO is: `UserA and UserB follows UserC. UserC is posting on its "flat" timeline and the content is "replicated" into UserA and UserB aggregated timelines`. Based on this understanding, I don't get the group approach or your example... sorry :/ What I am wondering is, are you telling me that each user can be a "group" itself and so at follow time, I follow a feed of this "user/group" instead of the follow the user itself? – Emixam23 Apr 15 '20 at 19:04
  • 1
    Vocabulary might be different. `user:some_id` is a `feed`, first part from colon is `feed group` and `some_id` is a specific one within that group. In your example, `UserA` is `user:a`, let's say. Then we create two feed groups `user_type_a` and `user_type_b` and `user:a` follows `user_type_a:a` and `user_type_b:a`. Type feed groups contain specific type of activities but `user` group has everything because it follows both. Similarly it's replicated for aggregated feed groups. I hope it clarifies. – ferhatelmas Apr 15 '20 at 19:20