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
dynamic feed slug support #89
Comments
So the Stream Framework and getstream.io are two different things.
For stream framework this example app shows how to set things up: |
So, GetStream.io is a wrapper/api of open sourced Stream Framework, or based on a internal version of Stream Framework? |
Not really, the user id just gets used to format a key, something like But I wonder why do you want to use the slug? |
I'm considering using Stream-Framework for a simple chat system, where the slug is the chat group name. |
What I want to do is |
can you elaborate a bit more on your use case? why is it not enough to consider the chat group name as |
Imaging we have multiple topics(cannot predefined), like health, science, python, etc. each user can subscribe/publish to a topic. |
why isn't topics:python enough for your use case? for example: |
ok. I understand now. |
the user_id parameter can be a bit misleading when the feed is not a user feed but a channel or topic feed; @tschellenbach perhaps we can improve this by adding some example in the docs and/or docstrings? |
but another case is that
this case still need dynamic feed slug. Think topic as a sub namespace of a tweet stream. |
if you need to keep one feed per channel and user then you need something more than "python" but indeed "python:X". I am not sure why you are calling this as dynamic feed slug; I think it makes this makes look the issue more complex than it actually is :) My suggestion is to add methods in your feed manager implementation that provide you with the right feed_id. For example you would have a method that gives you the feed's user_id for a topic ("python") and another method that gives you the user topic feed's id ("python:42"). for example:
|
I think I have understand the problem. Thanks all of you for help. |
It's not very clear how to implement getstream.io dynamic feed slug feature.
Create dynamic feed class? or merge feed_slug into user_id like
Feed(user_id="%(feed_slug)s:%(user_id)s")
? this is too hack.The text was updated successfully, but these errors were encountered: