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.

Popular Backend topics Top

DevotionGeo
There are 3 main formatters for Erlang which you can use from the command-line, rebar3_format, Steamroller elmfmt. Visual Studio Cod...
New
AstonJ
This article was written by @rvirding …over a decade ago! Posting here in case anyone else finds it of interest and adding it to our Erla...
New
New
First poster: bot
Part 1: Introduction to Postgrest. In Codd, we trust In the field of Computer Science and Engineering, few things come close to the dura...
New
First poster: bot
Once a year, I look back at the recent developments in the PHP world, and also look forward to what’s to come. And just like in 2020 and ...
New
First poster: bot
At Grammarly, the foundation of our business, our core grammar engine, is written in Common Lisp. It currently processes more than a thou...
New
First poster: bot
Today we’ll just talk about integer casting, but Zig also provides explicit casting support for floats, bools, enums, pointers, and more....
New
New
AstonJ
This was posted on the Elixir Forum and thought it was worth sharing here! I love how the excitement of the author shines through and I ...
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

Other popular topics Top

Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
Exadra37
On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New

Latest in Blogs/Talks

View all threads ❯