[erlang-questions] Recommendations for secure websocket + fallbacks

Marc Worrell marc@REDACTED
Fri Jan 29 09:33:16 CET 2016


And if you need some content-management features (templates, multi-lingual, timezones, etc) then you can also use Zotonic :)

http://channel.me <http://channel.me/> uses it as the backend for their co-browsing solution.
They place an iframe for their communication on the client’s website, this solves many (browser-)security issues.

Zotonic’s client/server transports are battle tested with weird phones, corporate networks, and ancient Internet Explorer browsers.

Some features of Zotonic transports:

 * Quick determination to use Websockets or Comet
 * Fallback to Comet if Websockets is failing
 * AJAX or Websocket postbacks to the server
 * Different kinds of payloads, with their own delegate handlers
 * You can add your own handlers
 * Active ping/pong to test the connection and check session status
 * Pubsub using MQTT-topic trees, in the browser and on the server

The MQTT pubsub enables publishing a message via MQTT to the server and receiving it in browsers.

- Marc


> On 29 jan. 2016, at 02:11, José Valim <jose.valim@REDACTED> wrote:
> 
> Someone mentioned on Twitter there is N2O as well: https://github.com/synrc/n2o <https://github.com/synrc/n2o>
> 
> It is in Erlang and it seems to be more focused on WebSockets instead of a web framework like Phoenix. It may better suit your needs. :)
> 
> 
> 
> José Valim
> www.plataformatec.com.br <http://www.plataformatec.com.br/>
> Skype: jv.ptec
> Founder and Director of R&D
> 
> On Thu, Jan 28, 2016 at 3:51 PM, José Valim <jose.valim@REDACTED <mailto:jose.valim@REDACTED>> wrote:
> Hi Lyn,
> 
> I usually avoid posting Elixir related solutions in here but, if Elixir is an option, you should take a look at Phoenix: http://www.phoenixframework.org/ <http://www.phoenixframework.org/>
> 
> Phoenix is a framework running on top of Cowboy and has a feature called channels that seems to provide what you are looking for:
> 
> * Handle websockets and fallback to long-polling when websockets is not available
> * Support cross-origin headers in both websockets and long-polling transports
> * Good browser compatibility (our long-polling implementation supports way back to IE8)
> * Ability to "force" SSL, allowing only https/ws connections
> 
> Channels run on top of a pubsub system, which allows anywhere in your application to broadcast messages to all connected clients on a given topic. We have recently written on how we got 2 million websocket connections on a single machine (at an arrival rate of 20k/s iirc).
> 
> Finally, the pubsub system is distributed. So if you want to deploy over multiple machines, we will use Distributed Erlang. No need for Redis. We are also working on a Phoenix Presence feature, using CRDTs alongside Distributed Erlang, so if you need presence support in the future, it will be handy too.
> 
> If you are interested in more information, you can try the Phoenix guides <http://www.phoenixframework.org/docs/overview>, the mailing list <https://groups.google.com/forum/#!forum/phoenix-talk> or join us on #elixir-lang on IRC Freenode.
> 
> 
> José Valim
> www.plataformatec.com.br <http://www.plataformatec.com.br/>
> Skype: jv.ptec
> Founder and Director of R&D
> 
> On Thu, Jan 28, 2016 at 2:00 AM, Lyn Headley <lheadley@REDACTED <mailto:lheadley@REDACTED>> wrote:
> I am developing a web app that will use client-side js code that I am
> writing to issue cross-origin requests from a domain not under my
> control to a web server under my control; and am evaluating whether to
> use websockets, long-polling, or another method. I need to consider
> things like browser compatibility (the more browsers supported, the
> better) and security (requests / packets must be secure, so https or
> wss I think). My ideal solution will support low latency messaging and
> high scalability, but will also support most browsers, and be easy to
> install and configure. One tactic for example would be to prefer
> websockets, but fall back to long-polling, which is what I understand
> socket.io <http://socket.io/> does.
> 
> 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?
> 
> I have a slight bias in favor of yaws, because I have already gotten
> it running, but am open to other web servers if it turns out to be too
> hard to make yaws do what I want.
> 
> Thanks,
> Lyn
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-questions <http://erlang.org/mailman/listinfo/erlang-questions>
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160129/4fbb0217/attachment.htm>


More information about the erlang-questions mailing list