banner



Cache Js5b88ea8twj Https //www.snacknation.com/blog/how-to-motivate-employees/

8 Node.js Web Socket Libraries for 2019

Useful libraries for working with web sockets and Node.js

Jonathan Saring

WebSockets make it possible to open an interactive communication session between the user's browser and a server, to send messages to a server and receive event-driven responses without having to poll the server for a reply.

Although some developers choose to work with the websocket API for asynchronous communication between browsers and servers, issues such as performance, dealing with faulty connections, handling authentication and authorization, or scalability might call for a framework/library.

To help you save time, here is a shortlist of useful and actively maintained libraries which can come in handy. Feel free to add your own suggestions.

Tip: Use Bit to share and reuse components and modules between projects. It will help your team build together, speed development, and stay in sync.

Also read:

How We Build a Design System and How We Build Micro Frontends 🚀

1. socket.io

A widely popular and used WebSocket wrapper/API with over 43K stars. Consisting of a Node.js server and a Javascript client library, socket.io provides reliability for handling proxies and load balancers as well as personal firewall and antivirus software and even supports binary streaming. Used by Microsoft, Zendesk and Trello, it even provides real time analytics and can be used for a wide verity of use cases from simple chats to IOT. Here's a useful tutorial by @davidwalshblog.

2. ws

With 9k stars WS is a popular WebSocket is a a client/server library for Node.js that helps to manage things under the WebSocket protocol. As the WebSocket protocol is natively supported in most major browsers, some choose to work with WS directly without using socket.io on top. Here's a quick link to the API docs and here's a short tutorial with Node.js and express.

3. sockjs

At 6k stars sockjs is a browser JavaScript library that provides a WebSocket-like object with a cross-browser Javascript API which creates a low latency, full duplex, cross-domain communication between the browser and the web server. It follows the HTML5 websocket API and only when it fails it falls back to browser specific protocols. Sockjs-node is the client-library's counterpart.

4. websocket node

This websocket tool for Node.js has 2k stars and is a mostly pure JavaScript implementation of the WebSocket protocol versions 8 and 13 for Node. WebSocket-Node includes both client and server functionality, available through WebSocketClient and WebSocketServer. Once a connection is established, the API for sending and receiving messages is identical. Here's a short tutorial for building a simple chat app, and here's a short presentation.

5. socketcluster

SocketCluster is a scalable HTTP + realtime server engine which lets you build multi-process realtime servers that make use of all CPU cores on a machine/instance. Instead of having to run the Node.js server as a single thread it makes your backend more resilient by automatically recovering from worker crashes and aggregating errors into a central log on each host. At 5k stars, It supports both direct client-server communication and group communication via pub/sub channels.

6. Feathers

At nerly 10k stars Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets (plugin) and flexible plug-ins. The feathersjs/socketio module allows to call service methods and receive real-time eventsvia Socket.io when working with node.js. Here's a short tutorial for building a simple chat application.

7. faye-websocket-node

A bit old and "only" 500 stars, this project is a standards-compliant WebSocket client and server. It provides classes for building WebSocket servers and clients in Node, but not the server itself or any additional abstraction other than the standard WebSocket API (apart from eventSource connections). There also a Ruby implementation for the concept.

8. websocket as promised

A WebSocket client library providing Promise-based API for connecting, disconnecting and messaging with the server. It's basically a simple request-response mechanism that returns a promise. To work with Node.js, it should be combined with a third-party node server library like websockets-node. Although only at 200 stars, The project is still under active development.

Honorable mentions

Note that these projects are mostly unmaintained.

  • nodejs-websocket
  • Primus
  • Express-ws
  • Pushers-js
  • Totaljs

Cache Js5b88ea8twj Https //www.snacknation.com/blog/how-to-motivate-employees/

Source: https://blog.bitsrc.io/8-node-js-web-socket-libraries-for-2018-818e7e5b67cf

Posted by: grubbsharks1988.blogspot.com

0 Response to "Cache Js5b88ea8twj Https //www.snacknation.com/blog/how-to-motivate-employees/"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel