paulanthonywilson

paulanthonywilson

Blog on using binary WebSocket messages with Elixir & Phoenix

So you’re enjoying using WebSockets with Elixir’s Phoenix Framework, and you want to send some binary messages. Maybe it’s an audio clip, some images, or something else. What you going to do?

Maybe step away from the Base.encode64/2. Maybe use WebSocket protocol’s binary messages instead. It’s a bit off the beaten track but not that hard, and I’ve written up how to get started in this blog post.

PS this is my first post here, trying to follow these instructions - someone let me know if I’ve got something wrong.

Most Liked

AstonJ

AstonJ

Looks good to me Paul! The only thing you could do differently is when you start creating a thread, paste the link into the title field first as this will add the link as a ‘featured link’ to your thread - these show on our homepage and go some way towards your SEO as we currently don’t add a rel-nofollow to user-submitted blog posts :sunglasses: (I will add it manually for you now…)

Also congratulations on the sale of Cultivate! Goes to show what a brilliant consultancy you had built up! I hope they’ll start porting over their main system to Elixir/Erlang at some point - from what I’ve seen of their success it sounds like they would make great use of the BEAM, haha!

Great post - thanks for sharing! :blush:

paulanthonywilson

paulanthonywilson

Brilliant - thanks so much and will do in future.

Where Next?

Popular Backend topics Top

dimitarvp
Apparently he decided to live-stream how he’s going to create a semver library.
New
paulanthonywilson
So you’re enjoying using WebSockets with Elixir’s Phoenix Framework, and you want to send some binary messages. Maybe it’s an audio clip,...
New
First poster: bot
In this post we’re going to be looking at a more advanced use of Gleam’s type system, known as phantom types. Hopefully by the end of thi...
New
First poster: dimitarvp
I’ve spent the last year building keyboards, which has included writing firmware for a variety custom circuit boards. I initially wrote ...
New
First poster: bot
This post is a spiritual successor to Loris Cro’s Go cross-compilation. The encounter During a recent stage 2 meeting Jakub Konka wanted...
New
CommunityNews
This thread was posted by one of our members via one of our news source trackers.
New
elbrujohalcon
Another week, another oldies-but-goldies post… This one about Test Driven Development.
New
brainlid
In episode 92 of Thinking Elixir, we talk with Mitchell Hanberg and learn about why he created the alternate Phoenix templating language ...
New
ragamuf
Does the world need another How to create a blog article? Maybe not. But then again, creating something out of nothing is what we love....
New
mudasobwa
Peeper is the tiny library to preserve state across GenServer crashes/restarts. Works as an almost drop-in substitute for GenServer, sui...
New

Other popular topics Top

AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
New
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
New