[erlang-questions] Recommendations for secure websocket + fallbacks
Fri Jan 29 16:19:22 CET 2016
On 01/28/2016 03:08 PM, Fred Hebert wrote:
>> I would be interested to hear any experiences you might have in this
>> domain, and any recommendations you might have for erlang libraries,
>> servers, etc. Has anyone done this? What stack did you deploy? What
>> were the issues you encountered?
> Sadly I'm afraid I can't be of much more help there. I've left a lot of
> my web dev work behind me. Something equivalent in spirit to the
> socket.io of old, but with the Erlang frame of mind is 'bullet',
> developped to work with cowboy: https://github.com/ninenines/bullet
> It's what I would consider your best bet, but I'm out of the game when
> it comes to that stuff and don't know what else may exist.
My recommendation today is to go with Websocket directly.
If you take a look at http://caniuse.com/#feat=websockets you can see
that it will just work on close to 90% of the global market share.
Chances are your local market share is higher than that, but it could
also be lower (in particular if you are writing an enterprise system).
Depending on when you will ship, it might not even make sense to ask
yourself this question anymore. If you ship even in 1 year it already
makes little sense, it's much easier to partially disable functionality
with a message recommending people update or switch browser.
Note that in those %s, nearly 5% are about Opera Mini. Opera Mini is a
very particular browser that supports very little interactive features.
I would not count it in market share and so the total of browsers that
do support Websocket today is closer to 95%. If you need to support
Opera Mini, I don't think even something like Bullet or Sockjs or other
As far as which Websocket implementation to use, I would suggest Cowboy
of course, since I wrote it, but I will go as far as to suggest Cowboy
master if you care about Websocket compression, although master is about
to receive more breaking changes from the work toward 2.0.
Author of The Erlanger Playbook,
A book about software development using Erlang
More information about the erlang-questions