nodejitsu / browsenpm.org

Browse packages, users, code, stats and more the public npm registry in style.
browsenpm.org
MIT License
44 stars 9 forks source link

WebSockets not degrading gracefully? #35

Open indexzero opened 10 years ago

indexzero commented 10 years ago

So I happen to be trying to visit this on shitty airplane WiFi which I don't think supports WebSockets which is causing this behavior.

Tried to compile as much Network information from Chrome and Firefox as I could

screen shot 2014-07-09 at 8 00 16 pm

screen shot 2014-07-09 at 8 04 15 pm

screen shot 2014-07-09 at 8 05 01 pm

screen shot 2014-07-09 at 8 05 53 pm

3rd-Eden commented 10 years ago

The rendering of pagelets should not be affected by the real-time connection that BigPipe creates. The only thing a pagelet needs to renders is:

  1. The HTML it receives from the server
  2. The CSS for the styling
  3. The JavaScript for the interactions.

The real-time connection does not affect anything here. For the search pagelet it would only be used when you actually search and I don't think that the status pagelet requires any real-time connection either.

By checkout of the screenshots we can see that the HTML and CSS is already shown on the page which means that all assets have been loaded correctly (as it's styled). Because it only shows a dropdown element in the search pagelet we can safely assume that there's an issue with the execution of the javascript. It probably missed a render event. So there might a race condition in our asset loader but i'm not. I can only guess here because I'm unable to reproduce these conditions.

3rd-Eden commented 10 years ago

Anyways, master is now using SockJS instead of WebSockets. After we've updated our servers it will also run the latest big pipe so I hope this solves a large portion of the issues that you were seeing.