-
-
Notifications
You must be signed in to change notification settings - Fork 400
feat: realtime v2 serializer #1606
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
Open
edgurgel
wants to merge
15
commits into
main
Choose a base branch
from
feat/realtime-v2-serializer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7f6f1e8 to
ae956e0
Compare
44fcfaf to
c9cf984
Compare
6 tasks
8b49635 to
7eaf28d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
filipecabaco
approved these changes
Nov 7, 2025
Member
filipecabaco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our lib/realtime_web/channels/realtime_channel/message_dispatcher.ex is getting very complex we should take sometime to improve readability but later
7f9ccff to
eb5ed53
Compare
Contributor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
New V2 serializer that is a super set of the Phoenix V2 JSON Serializer. It has 2 special types of messages:
The clients will be able to send a new User Broadcast Push which allows for binary or JSON payloads. It allows for a more efficient handling of the user payload as well.
The backend will be able to then broadcast the User Broadcast Push as User Broadcast for the serializers with V2 while also being able to convert to the V1 Broadcast that Phoenix V1 JSON Serializer supports as long as the user payload is JSON.
If a binary payload is sent and there is a websocket using V1 listening it won't receive such message as only JSON is supported by V1.
This PR also add a new GitHub workflow to run integration tests with deno. Currently pointing to a realtime-js preview release for now.
And finally I fixed the Realtime Channel integration tests to run async as I'm now running them twice with each serializer and it was ultra slow to have them running synchronously:
Additional context
Connected to supabase/supabase-js#1829