Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How or where the follow relationship is stored ? #222

Open
The-Neo-Noir opened this issue Sep 10, 2018 · 8 comments
Open

How or where the follow relationship is stored ? #222

The-Neo-Noir opened this issue Sep 10, 2018 · 8 comments
Labels

Comments

@The-Neo-Noir
Copy link

I am trying to understand this framework, but could not figure out how the follow relation is established and where that information is stored ( redis, or Cassandra)

@cosmologist10
Copy link

I am also stucked at same place and I am also not getting how serialized activities is stored in redis storage level. If you got it's workflow, can you please explain

@tbarbugli
Copy link
Collaborator

@The-Neo-Noir there is no follow storage included in the framework. The framework include APIs to create follows (and remove) between feeds (eg. let timeline X follow user Y) but where you store that is up to you. A common approach is to have a follow table to keep track of follow relationships.

If you are familiar with Django:

@cosmologist10 the activity storage on Redis is pretty simple, they are stored in a K/V way

https://github.com/tschellenbach/Stream-Framework/blob/master/stream_framework/storage/redis/activity_storage.py

Timelines don't include the full activity but only references

https://github.com/tschellenbach/Stream-Framework/blob/master/stream_framework/storage/redis/timeline_storage.py

@cosmologist10
Copy link

cosmologist10 commented Mar 5, 2019

Thanks for response. I have solved few dependencies issues, while running test cases. Let me know if I can contribute.

@tbarbugli
Copy link
Collaborator

@cosmologist10 that's great to hear! Best way is to create a PR with your changes

@cosmologist10
Copy link

@tbarbugli cool, I will create a PR by E.O.D and I have also solved docker issue of pinterest example. But even after solving all these issues, I am still not able to integrate this framework with my application. So, I am now trying to build feed modules from scratch.

@goupgoupgoup1111
Copy link

I have a question that when using redis to save notification feed (count, seen/unseen, read/unread) on ram, what happen if redis was restarted and how to init these value again?

@vlafranca
Copy link

I have a question that when using redis to save notification feed (count, seen/unseen, read/unread) on ram, what happen if redis was restarted and how to init these value again?

Redis is persistent, so it keeps data even if you restart it.
StreamFramework is only a processing moddleware, all the stuff you put into streamframework should be stored into a real database for legacy storage purpose. This way if you face a data loss you're able to replay it from your database.
Django uses an sqlite db by default.

@goupgoupgoup1111
Copy link

goupgoupgoup1111 commented Sep 17, 2019

Hi guys,
How can i get FULL data of actor and object of an activity? Because i can only get activity id and object id not FULL data. This is my code

get_feed_notification = manager.get_feeds("scott")['notification']
get_feed_notification_activities = get_feed_notification[:25]
for item in get_feed_notification_activities:
    group = item.group,
    is_read = item.is_read,
    first_activity = item.activities[0],
    actor_of_activity = ?,
    object_of_activity = ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants