0.7 transports are inconsistent

31 views
Skip to first unread message

AD7six

unread,
Jul 5, 2011, 6:59:58 AM7/5/11
to nowjs
Hi now-ites.

I've been looking into some odd differences in behavior between
different browsers, which were initially reported to me for an
application built using now as "IE(8) doesn't work".

Before the browser jokes flow: no, I cannot ignore IE, and neither
should nowjs :).

My app level investigation concluded that now was not syncing changes
to the now object in IE8 and sometimes on FF 3.6. The inconsistency
with FF 3.6 in particular lead me to believe it was something related
to different transports (and that FF 3.6 on windows was oscilating
between websockets and xhr polling).

So.. below browsers are referred to as:
1 = Chromium 10 (arch linux)
2 = Chrome 12 (windows)
3 = Firefox 4.0 (arch linux)
4 = Firefox 3.6 (windows)
5 = IE8 (duh)

I started looking at socket.io's own example taken from 0.7.6 tag, and
found that it worked fine with these results by browser:

1 2 3 4 5
websocket Y Y X X X
flashsocket X X Y Y Y
htmlfile X X X X Y
xhr Y Y Y Y Y
jsonp Y Y Y Y Y

Of particular importance xhr and jsonp, the fallbacks, work in all
browsers.

armed with that, I used socket.io 0.7.6, and a slightly modified nowjs
0.7 branch (https://github.com/AD7six/now/commits/transport-
investigation) I had a look how nowjs performs with different
transports in different browsers. the results are not black and white,
but to summarize results were:

1 2 3 4 5
websocket Y Y X X X
flashsocket X X Y Y Y
htmlfile skipped/irrelevant
xhr Y Y Y Y X
jsonp X X X Y X

Screenshots:
jsonp-polling: http://ad7six.com/dump/jsonp-polling.png
xhr-polling: http://ad7six.com/dump/xhr-polling.png
sockets: http://ad7six.com/dump/sockets.png

Specific notes.

jsonp:

Chromium (linux)
- Doesn't connect, posts appear to result in an error

FF 3.6 (windows)
- receives lots and lots of connect/reconnect messages
- Only receives a name from itself and IE8

IE8
- receives, can't send
- receives no names
- doesn't receive messages originating from the server

xhr:

IE8
- receives, can't send
- doesn't receive messages originating from the server

sockets:

IE8
- doesn't receive messages originating from the server

Previously using the now.js 0.6, users would experience frequent
disconnects, which has led us to upgrade to use 0.7 - but now I'm left
wondering if I will have to reverse that decision and put up with
sporadic complaints about things "not working" because users are
getting cut off.

Has anyone else seen similar behavior?

Is anyone aware and working on any of the problems (if they are indeed
problems) or got any hints/tips for addressing anything specific which
can be gleaned from the above?

Cheers,

AD

Tom

unread,
Jul 5, 2011, 7:17:54 AM7/5/11
to no...@googlegroups.com
Hi AD,

Not too much I can say about the issue, but this is some great testing you've done.

The question of course is what causes the differences between socket.io and now in combination with the same transports. I cannot actually think of any plausible reasons right now.

My guess is the only way to figure this out is to debug each scenario that causes difficulties step by step.

Tom

2011/7/5 AD7six <andyda...@gmail.com>

Eric Zhang

unread,
Jul 5, 2011, 12:43:40 PM7/5/11
to no...@googlegroups.com
Hey Andy,

I'm going to take some time to investigate this today. As Tom said, these things should be abstracted away ( we don't do anything funnny with socket.io).

I'll report back what I find.


Eric
Reply all
Reply to author
Forward
0 new messages