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

WIP/PROPOSAL - Redis publishing format #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ETetzlaff
Copy link
Contributor

Converts serialization from Marshal to JSON when publishing into Redis. This could theoretically allow for any language to poll Redis and publish into Rabbit or whatever sink as well.

@ETetzlaff ETetzlaff force-pushed the et/redis-pub-format branch 2 times, most recently from 131f24d to 0adb0c1 Compare November 4, 2021 20:44
@ETetzlaff ETetzlaff force-pushed the et/redis-pub-format branch from 0adb0c1 to ad022a6 Compare November 4, 2021 20:46
@ETetzlaff ETetzlaff changed the title WIP - Redis publishing format WIP/PROPOSAL - Redis publishing format Nov 4, 2021
end

def to_json
self.to_h.to_json
Copy link
Contributor

Choose a reason for hiding this comment

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

We will probably want to wrap "payload" in base64 encoding to avoid parsing random bytes as a string in json (won't work).

@film42
Copy link
Contributor

film42 commented Nov 5, 2021

We will need to bump

REDIS_LIST_KEY = "ACTIVE_PUBLISHER_LIST".freeze
to ACTIVE_PUBLISHER_LIST.V2 or something to avoid breaking changes (reading from a queue with marshal'd data instead of json encoded data). I think we can ignore the "safe upgrade" path though. We can make the assumption that the queue is empty before we upgrade, but bumping the list key version assures this is true.

@ETetzlaff ETetzlaff force-pushed the et/redis-pub-format branch 2 times, most recently from 41379b0 to 960e059 Compare November 10, 2021 19:52
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.

2 participants