[erlang-questions] How to build web chat in Erlang?

Tyler Margison kolorahl@REDACTED
Wed Oct 8 23:52:06 CEST 2014


I'm speaking somewhat in ignorance here, as I haven't looked comet2 or the
nitrogen project recently, but there's bullet for cowboy(1). The JavaScript
component(2) comes with fallback methods and auto-reconnect, so it might be
worth at least looking at what the JavaScript code is doing, as you might
be able to use those concepts in your own project. No guarantees, but just
putting it out there.

1. https://github.com/extend/bullet
2. https://github.com/extend/bullet/blob/master/priv/bullet.js

On Wed, Oct 8, 2014 at 10:08 AM, Jesse Gumm <gumm@REDACTED> wrote:

> Thanks for the heads up.  There are some auto-reconnection
> capabilities built into Nitrogen, but they are a little nasty and
> undocumented and this particular page does not use them.  I'm working
> to improve this in the upcoming 2.3 release (Which should be ready in
> the next couple of weeks).
>
> I'll do some playing around tonight and shoot you an email off-list
> tonight or tomorrow.
>
> -Jesse
>
>
>
> On Wed, Oct 8, 2014 at 11:55 AM, Rainer Hansen <rainer.hansen@REDACTED>
> wrote:
> >
> > Jesse Gumm <gumm@REDACTED> writes:
> >
> >> Hi Rainer,
> >>
> >> Nitrogen has a pretty simple chat example:
> >> http://nitrogenproject.com/demos/comet2
> >>
> >> (see the "View Source" link to see the code that makes that page
> >> work). Changing that page to use multiple chat rooms is about 5-6 more
> >> lines of code.
> >>
> >> Alternatively, you could look into Chicago Boss (go through the
> >> tutorial, and the ways of building a chat system with it should become
> >> rather clear).
> >>
> >> Anyway, good luck!
> >>
> >> --
> >> Jesse Gumm
> >> Owner, Sigma Star Systems
> >> 414.940.4866 || sigma-star.com || @jessegumm
> >
> >
> > Hi Jesse,
> >
> > thanks for the fast answer and the link to the chat demo. It works great
> > in the desktop browser (Firefox) but on my smartphone browser (also
> > Firefox) I seem to get trouble with timeouts. My smartphone is not
> > constantly connected to the Internet and this seems to cause some
> > trouble. I can still post and others on the same page see the post but
> > nothing is updated in my mobile browser window. I can also not see the
> > updates of others after the connection is once interrupted.
> >
> > Any ideas on how to improve the Nitrogen example to handle this
> situation?
> >
> > I will also take a look at the Chicago Boss tutorial ...
> >
> > Rainer
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
> _______________________________________________
> 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/20141008/04b9948d/attachment.htm>


More information about the erlang-questions mailing list