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

Add redis-streams backend #115

Merged
merged 7 commits into from
Apr 22, 2024

Conversation

alex-oleshkevich
Copy link
Member

Based on #102
Seems that the author of #102 did not notice a call for update, so I am creating a new PR in order to proceed with this backend.

@encode/maintainers please do a review

closes #102
closes #3

README.md Outdated
@@ -111,6 +112,6 @@ state, make sure to strictly pin your requirements to `broadcaster==0.2.0`.
To be more capable we'd really want to add some additional backends, provide API support for reading recent event history from persistent stores, and provide a serialization/deserialization API...

* Serialization / deserialization to support broadcasting structured data.
* Backends for Redis Streams, Apache Kafka, and RabbitMQ.
* Backends for Apache Kafka, and RabbitMQ.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Member Author

@alex-oleshkevich alex-oleshkevich Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is What's next section. Redis Streams lands with this PR and Kafka is already there.

@tomchristie
Copy link
Member

tomchristie commented Apr 22, 2024

Are you able to give a brief pointer towards when there'd be a use-case for redis streams vs. redis pub/sub?

(Just in this conversation is enough, I don't think we have sufficient docs to have a good place for this right now)

@alex-oleshkevich
Copy link
Member Author

Redis Streams is a lightweight Kafka alternative. While pub sub is fire-and-forget, Redis stream is an append only log.

@tomchristie
Copy link
Member

Reviews README and discovers that past me already wrote about this. Thanks that person.

To be more capable we'd really want to [...]

Add support for subscribe('chatroom', history=100) for backends which provide persistence. (Redis Streams, Apache Kafka) This will allow applications to subscribe to channel updates, while also being given an initial window onto the most recent events. We might also want to support some basic paging operations, to allow applications to scan back in the event history.

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@alex-oleshkevich alex-oleshkevich merged commit c4b4d59 into encode:master Apr 22, 2024
5 checks passed
@tsotnesharvadze
Copy link
Contributor

thanks 🙏

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

Successfully merging this pull request may close these issues.

3 participants