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

custom fanout logic #237

Open
mikestaub opened this issue Mar 29, 2020 · 8 comments
Open

custom fanout logic #237

mikestaub opened this issue Mar 29, 2020 · 8 comments

Comments

@mikestaub
Copy link

Is there a way to prevent a fanout based on data in the activity?

My use case is a privacy feature where users want to publish an activity to groupA but exclude userA, who is a follower of groupA.

Is it possible to use a custom Aggregator for this?

@tschellenbach
Copy link
Owner

Most activity feeds apply a filter at read time to deal with privacy settings. (The do it at read time, so if you change a privacy setting the feeds change immediately)

@mikestaub
Copy link
Author

I considered doing this, but I'm using the getstream.io platform and don't want to proxy the websocket connection. It almost defeats the purpose of using the service as I will have to route all that traffic through my servers. I was hoping for a different solution.

@tschellenbach
Copy link
Owner

tschellenbach commented Mar 29, 2020 via email

@mikestaub
Copy link
Author

I do have feeds per privacy level, but the feature allows users to create exclusion sets ( include friends, exclude coworkers ), so if a coworker is also in the friends group they will see the activity - when they should not.

The way I am working around this now is flattening the groups into users but that is very inefficient and defeats the purpose of the fanout.

If I proxy the feeds I will then have to implement a websockets server which is non-trivial. ( one of the benefits we get for 'free' with faye ) But it seems like there is no other way to achieve what I want with this framework.

@tschellenbach
Copy link
Owner

tschellenbach commented Mar 29, 2020 via email

@mikestaub
Copy link
Author

But to connect to the websocket don't I need to pass a token to the client? Then the user can use that token to theoretically read the feed manually and see all the activities, bypassing the proxy.

@tschellenbach
Copy link
Owner

tschellenbach commented Mar 29, 2020 via email

@mikestaub
Copy link
Author

That is probably what I will do. It's unfortunate I have to lose the realtime support of getstream to achieve this. Using Pubnub will increase the cost of the service.

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

No branches or pull requests

2 participants