Skip to content

Push channel JSON over binary #5815

Open
@josevalim

Description

@josevalim

Both Bandit and Cowboy validate UTF-8 of text frames, per spec, but Channels push JSON which are also validated against UTF-8. Therefore, I suggest we use a binary frame for pushing JSON.

Our serializers already handle binary frames, but they always start with the bytes 0, 1, and 2. So there is no clash with JSON and we can start sending JSON over binaries frames without introducing a new serializer version. However, we may want to have a flag on the client that forces it over text instead for those who for some reason need to run against other serializers.

/cc @mtrudel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions