[erlang-questions] Recommendations for secure websocket + fallbacks

Loïc Hoguin essen@REDACTED
Fri Jan 29 17:09:05 CET 2016


To add to that:

If you need messaging or can design your application this way, then 
RabbitMQ is definitely a great solution.

A few notes however:

The SockJS in the Web STOMP plugin only accepts UTF-8 messages (this is 
also true of Bullet and most solutions that provide fallbacks). If you 
need binary, the Web STOMP plugin has a plain Websocket endpoint but 
that one has no fallback.

The Web MQTT plugin currently does not work against the most recent 
RabbitMQ version, it will work against 3.6.1 onward. Right now you need 
to have an unreleased version of the RabbitMQ MQTT plugin that contains 
the required changes.

The Web MQTT plugin is currently considered experimental. Feedback would 
however be much appreciated.

Disclaimer: I wrote the Web MQTT plugin and am the current maintainer of 
the Web STOMP plugin.

On 01/29/2016 04:57 PM, Santiago Fernández wrote:
> If you want to take advantage from another Erlang system for your
> development, take a look to RabbitMQ. There is a Web STOMP plugin (using
> SockJS or plain WebSockets). I'm not sure what are the pros and cons of
> STOMP vs plain WebSocket (bandwith, performance, scalability, etc) but
> it is easy to integrate.
>
> You can develop your own Erlang application an deploy it with the broker
> in the same cluster, to avoid AMQP overhead (direct connection). Or you
> can develop your own plugin using Erlang and using all RabbitMQ
> infrastructure.
>
> There is also a plugin for MQTT over WebSockets under development.
>
> sorry for my english!
>
>
>
> --
> Santiago
>
> On Fri, Jan 29, 2016 at 12:19 PM, Loïc Hoguin <essen@REDACTED
> <mailto:essen@REDACTED>> wrote:
>
>     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 <http://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 will work.
>
>     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.
>
>     Cheers,
>
>     --
>     Loïc Hoguin
>     http://ninenines.eu
>     Author of The Erlanger Playbook,
>     A book about software development using Erlang
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>

-- 
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang



More information about the erlang-questions mailing list