Why should I use Socket.io? [closed] - node.js

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am learning Node.js and am currently studying WebSockets. As I understand it, Socket.io was intended to address inconsistent support that the various browsers had with WebSockets...If you check out caniuse WebSockets, it appears that WebSockets currently has practically full support. Can anyone explain why I should use Socket.io versus WebSockets in this case?

It handles graceful degradation for you to numerous technical alternatives to get bi-directional near-time communication flowing (web sockets, ajax long polling, flash, etc)
As of March 2013 that site lists web sockets at 61% support. This is not "practically full".
As of September 2021 that site lists web sockets at 98% support. All modern browser's support Websockets.
It handles browser inconsistencies and varying support levels for you
(these first 2 things are basically the same value created by jQuery, to put it in perspective)
It includes additional features beyond bare bones web sockets such as room support for basic publish/subscribe infrastructure and things like automatic reconnect
AFAIK it is more popular and easier to get help with than vanilla web sockets, at least at the moment.
However, just like there is VanillaJS for the jQuery haters, if you prefer using the official standard web socket APIs directly, by all means, knock yourself out.

Related

Why is the 'Google Chrome Renderer' multi-processes, not multi-threaded? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Every time I load a browser tag in Chrome on my mac, the application forks another process. This seems to be different from how firefox or Safari work. What was the reason why Google stayed away from multi-threading in this case? The problem to be solved here (rendering multiple pages at once would seem in my mind to be a prime candidate for muti-threading, or?
Running each page (or tab) in a separate process allows Chrome to provide a bit more security against page rendering bugs, as well as browser plug-ins that run within a process. Basically, if one page crashes, it won't affect other tabs. Instead, you'll get an "Aw Snap!" message.
From the docs:
We use separate processes for browser tabs to protect the overall
application from bugs and glitches in the rendering engine. We also
restrict access from each rendering engine process to others and to
the rest of the system. In some ways, this brings to web browsing the
benefits that memory protection and access control brought to
operating systems.

Why IndexedDB is not available in node.js? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
IndexedDB API on node.js will be very useful for some app.
Why IndexedDB is not available in node.js?
IndexedDB API does not depend on DOM, even though it does use some DOM error and event style.
It's possibly because IndexedDB is part of a different body of standards. Node.js is just ECMAScript (via Google's V8) along with their own API. Also, it may not help that IndexedDB is still in "Draft."
But, more likely it's for the same reason Node.js doesn't offer any database drivers: it's not trying to solve those problems. It's just trying to offer the APIs that assist someone who does want to solve and implement them.
And, for that, it appear at least one such project has already started: indexeddb-js. But, also have a look through IndexedDB in the NPM Registry.

Node.js: Framework or no Framework? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am new to Node.js. I am very keen about learning it from scratch. I have a project which is like a Social media advertising web app. It won't be like Facebook, it is more like Myspace. It will be small at first, but it may become big in the future.
I would like to know if it's better to:
Use Node.js without a ready-made framework
Using an existing framework like Express, Geddy
I have done some research on sites out there using Node.js, and there are good sites that use a ready-made framework, and there are sites that don't. Is it worth creating our own site from scratch, or is it better to use a framework? Will using a framework restrict my ability to design my app and get in the way of learning Node.js?
So I would like to know that should I choose a framework or not. I am fine with learning Node.js from scratch and I'm not in a hurry or something.
The followup question is that there are lots of coding tutorials out there, but I would like some resources on the non-coding parts, such as software design, structure, etc..
Thanks for answering in advance.
Express, don't give it a second thought as a beginner.
While you may be interested in learning "from scratch" - you mention you are trying to develop a project which I assume should takes precedence over developing a framework.
Express, and node in general, is not that high-a-level of abstraction so you are not "losing" power as you may with a Java, etc framework.
You haven't mentioned anything hard or exotic that warrants a DIY framework. Even if you need that at some point, you will gain experience in node/express way of doing things first.

socket.io vs. SignalR [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am developing a ASP.NET MVC app deployed on Azure, and looking for a library providing asynchronous transport mechanism/fallback.
After my own research, I've concluded that there are two well-known candidates - Socket.io and SignalR.
My question is simple) What's the pros and cons of them? It there any good reason to use one over the other?
thanks :)
I'd have to say that SignalR is definitely the best approach for your application. With the current build our laptops serving as servers are pushing around 350k messages/s. With the next release it will be even higher (several multiples higher judging by current tests).
Check out the main site: http://signalr.net/
The GitHub: https://github.com/SignalR/SignalR
JabbR for questions: http://jabbr.net/#/rooms/signalr
I've never used SignalR and according to what google tells me it is a replacement solution for .Net apps.
So I guess you should give it a try.
Socket.IO is awesome, I love it but I'm a noder. According to their doc there is no .net/c# bindings. Maybe their doc is not up to date.

Debugging websocket failures behind corporate proxy/firewall [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have read in numerous places that in theory an ssl/443 websocket connection has a high percentage success rate when the client is behind corporate proxy/firewalls. This topic also touches on the issue: Websockets behind enterprises proxies.
Our setup is node.js with websocket-node server side, passing binary data to Chrome 15+ client. No issues with performance as it is blazing fast. I do however have failed connections within corporations, in one example I know they are using an explicit proxy, connecting to that proxy server on port 8080.
The first question is two part: a) what mechanisms can I use to debug the issue to know what is blocking the upgrade, and b) for those with experience what is most likely the culprit?
Secondly, what performance hit will I take if I fall back to flash (i.e. websocket-js)?
Many thanks in advance.
UPDATE: It is now clear that the upgrade handshake request is never being seen by the websocket server, so it is being blocked on the client side before the request ever gets out.

Resources