[erlang-questions] erlang to browsers ("sessions" question, I suppose)

Alexandre Karpov alexakarpov@REDACTED
Sun Oct 8 04:54:19 CEST 2017


Hi all,

I've just started on Cowboy (which I've discovered through this same
mailing list, thanks y'all), and the introductory article resonated
perfectly and expressed exactly the reasons for me quitting my last job to
go on a "sabbatical" studying Erlang (which I've first found out back in
2010 from a talk by an Amazon's Principal Engineer in Seattle, who was
leagues ahead of me in all things software, and was in love with the
language and environment).

Aside from the goal of studying the language and OTP, there were a couple
of questions which really interested me; hope they're not too hand-wavy and
general to raise up:

1) Will there be a BEAM emulator in Javascript?
Joe chuckled in one of his talks how back when Erlang was being created,
the computers it was to run on were weaker than our modern cell phones =)
But, as I can see, the state of the art is still not quite there yet. What
are your thoughts on it? Will this ever come? If no, why not? - and if yes,
then what are the major problems? Because I'm sure you can see why this
sounds like a majestic possible universe - imagine each browser a potential
Erlang node...

2) Aside from that phantasy, having browser acting as a client of some
Erlang system is obviously a reality long time ago. There are, well, web
servers, and Cowboy with Websockets is an obvious point of interest. Sorry
if I am using improper terminology here - is Cowboy server a good fit for
creating and maintaining "sessions", which is to say, connections which
have some sort of a pair of stateful process on the server side and a
client side? Normally I'd think of databases when I think of such
"persistent connections" - connection is actually stateless, but every
request from a client is accompanied by database queries, and so we're
faking the "session"... with WebSockets+Erlang, is there a more real
session option? Is there already a setup where I get an Erlang process
waiting for a next message from a browser, replying to the browser with a
message?

Cheers,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171007/ba922029/attachment.htm>


More information about the erlang-questions mailing list