Poor websockets service

88 views
Skip to first unread message

Szymon Czaja

unread,
Mar 31, 2014, 6:31:40 PM3/31/14
to chica...@googlegroups.com
Guys, I have downloaded the draw tutorial and this is just not kicking... The connection to my websockets handler gets immediately closed. Any ideas? 

I have played around a bit with Zotonic and I have to admit the support for websockets there is just so much better, there is automatic fallback to comet and it just works. They have their own java script libraries for this whereas CB simply lacks this basic stuff. Making the use of websockets useless in production...

Any plans to improve websockets handling in the nearest future?


David Welton

unread,
Apr 1, 2014, 4:15:05 AM4/1/14
to chica...@googlegroups.com
Hi,
Chicago Boss is in something of a transition period, so it's kind of
rough around the edges right now. But the web socket stuff does work,
or at least it did in the past. We were successfully using it.

CB is a lot smaller than Zotonic (check out the difference in memory
footprints), so it's more of a system where you'll need to bring a few
of your own libraries and build the application you want, rather than
getting a ton of stuff out of the box.

--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

Szymon Czaja

unread,
Apr 1, 2014, 5:51:26 PM4/1/14
to chica...@googlegroups.com
Thank you David.
Websockets work well with Firefox 25.0, they do not in Chrome Version 33.0.1750.146. I am getting 'connection closed' on the server side and it looks like the browser is failing to do ssl handshake with the server. I am running:

{cb_admin,"Chicago Boss Admin Interface",
           "/bin/sh: 1: 0.7.1: not found"},
 {hub,"My Awesome Web Framework",
      "/bin/sh: 1: 0.0.1: not found"},
 {boss,"Chicago Boss web framework, now serving three flavors of Comet",
       "0.8.11"},
 {cowboy,"Small, fast, modular HTTP server.","0.9.0"},
 {ranch,"Socket acceptor pool for TCP protocols.","0.9.0"},
 {cowlib,"Support library for manipulating Web protocols.",
         "0.4.0"},
 {tinymq,"TinyMQ: a diminutive message queue","0.1.0"},
 {mimetypes,"mimetypes","1.0"},
 {crypto,"CRYPTO version 2","3.2"},
 {lager,"Erlang logging framework","2.0.3"},
 {goldrush,"Erlang event stream processor","0.1.6"},
 {compiler,"ERTS  CXC 138 10","4.9.4"},
 {syntax_tools,"Syntax tools","1.6.13"},
 {sasl,"SASL  CXC 138 11","2.3.4"},
 {stdlib,"ERTS  CXC 138 10","1.19.4"},
 {kernel,"ERTS  CXC 138 10","2.16.4"}


Any work-arounds?

chan sisowath

unread,
Apr 2, 2014, 3:01:34 AM4/2/14
to chica...@googlegroups.com
a possible work-around:  update CB to official version

here command for linux shell:
>rm -fr deps
>git pull origin master
>make clean && make

i use firefox and chrome Version 33.0.1750.152 Ubuntu 13.10 (256984)
it work for me.




--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/797363f5-7c0c-444f-81cf-92cfddf1fe6a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

David Welton

unread,
Apr 2, 2014, 4:42:28 AM4/2/14
to chica...@googlegroups.com
I have some vague recollections of a problem with this.

new WebSocket("ws://www.example.com/socketserver");

is how I'm opening them, I recall there being a problem with the

new WebSocket("ws://www.example.com/socketserver", "protocolOne");

style. Try both and see if that fixes anything.
> https://groups.google.com/d/msgid/chicagoboss/CAB-Ofhk4SoQmqmpmcB1qRt2WgKxe-j5Ph70vfvtHBdmfDGMThA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



Szymon Czaja

unread,
Apr 2, 2014, 2:03:23 PM4/2/14
to chica...@googlegroups.com
Thanks David! I managed to get it all running on Firefox and Chrome... stilll no luck on Safari though. 
Are you aware of any plans to support e.g. Bullet or Socket.io-like library that would ensure the websocket support throughout browsers and provide a XHR fallback? 

Jesse Gumm

unread,
Apr 2, 2014, 3:00:07 PM4/2/14
to chica...@googlegroups.com
Hi Szymon,

Currently, anything is on the table with ChicagoBoss, though whether or not something client-side like this would make it in for 1.0 is undecided - at some point, we have to lock the API to get a solid 1.0 out, and right now, there are definitely some cases where things aren't quite as stable as we'd like them to be.

And so far at least, CB is almost 100% server-side stuff (no client-side at all), however, providing some kind of mechanism to smoothly fallback websockets to polling is indeed something that *should* be done.

But as others have said, CB is in a bit of a limbo state on the way to solidifying for a working 1.0 release.  Indeed the websocket stuff is going to be revisited soon, and debugged in all websocket enabled servers and tested against the Autobahn Test suite (http://autobahn.ws/testsuite/) for proper adherence to the spec.

All that said, I'm open to Pull requests as we hunt down stability issues and solidify the API!

Thanks for expressing your concerns, they are well heard and understood and will be addressed in due time!

-Jesse


On Wed, Apr 2, 2014 at 1:03 PM, Szymon Czaja <szymonpi...@gmail.com> wrote:
Thanks David! I managed to get it all running on Firefox and Chrome... stilll no luck on Safari though. 
Are you aware of any plans to support e.g. Bullet or Socket.io-like library that would ensure the websocket support throughout browsers and provide a XHR fallback? 

--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.

For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
Reply all
Reply to author
Forward
0 new messages