node-redis-pubsub | Simple pubsub for node using Redis | Runtime Evironment library

 by   louischatriot JavaScript Version: 5.0.0 License: No License

kandi X-RAY | node-redis-pubsub Summary

kandi X-RAY | node-redis-pubsub Summary

node-redis-pubsub is a JavaScript library typically used in Server, Runtime Evironment, Nodejs applications. node-redis-pubsub has no bugs, it has no vulnerabilities and it has low support. You can install using 'npm i node-redis-pubsub' or download it from GitHub, npm.

NRP (Node Redis Pubsub).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              node-redis-pubsub has a low active ecosystem.
              It has 263 star(s) with 59 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 11 open issues and 15 have been closed. On average issues are closed in 127 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of node-redis-pubsub is 5.0.0

            kandi-Quality Quality

              node-redis-pubsub has 0 bugs and 0 code smells.

            kandi-Security Security

              node-redis-pubsub has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              node-redis-pubsub code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              node-redis-pubsub does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              node-redis-pubsub releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed node-redis-pubsub and discovered the below as its top functions. This is intended to give you an instant insight into node-redis-pubsub implemented functionality, and help decide if they suit your requirements.
            • Node for redis
            • Initialize Redis client
            Get all kandi verified functions for this library.

            node-redis-pubsub Key Features

            No Key Features are available at this moment for node-redis-pubsub.

            node-redis-pubsub Examples and Code Snippets

            No Code Snippets are available at this moment for node-redis-pubsub.

            Community Discussions

            QUESTION

            Some problems when scaling Socket.IO to multiple Node.js processes using cluster
            Asked 2017-Mar-10 at 17:56

            My node.js server uses cluster module in order to work on multiple processes.

            If the server receives requests from clients with Socket.IO, it conveys the data to another server with redis publish. And it receive refined data with redis subscribe, and then it just toss this data to clients.

            I use one node process to receive data with redis sub, and other processes to send data to clients with socket.io.

            And the client connect socket.io when page loaded. Here, this is my problem. The connect event occured repeatedly not even the page loaded. When the client connect, I get the socket.id from that socket, and I use it later when I want to send data to that client socket. But this connect occur repeatedly, I think socket that client use changed. So, the first socket.id that I remembered will be useless. I can't send data from that socket.id. I stored auth information in the socket object, so the changed client socket is no help.

            index.pug

            ...

            ANSWER

            Answered 2017-Mar-10 at 17:56

            By default, socket.io connects with several consecutive http requests. It essentially starts in HTTP polling mode and then after some initial data exchange, it switches to a webSocket transport.

            Because of this, a cluster that does not have any sort of sticky load balancing will not work. Each of the initial consecutive http requests that are all supposed to go to the same server process will probably be sent to different server processes in the cluster and the initial connection will not work.

            There are two solutions that I know of:

            1. Implement some sort of sticky load balancing (in the clustering module) so that each client repeatedly goes to the same server process and thus all the consecutive http requests at the beginning of a connection will go to the same server process.

            2. Switch your client configurations to immediately switch to the webSocket transport and never use the HTTP polling. The connection will still start with an http request (since that's how all webSocket connections start), but that exact same connection will be upgraded to webSocket so there will only ever be one connection.

            FYI, you will also need to make sure that the reconnect logic in socket.io is properly reconnecting to the original server process that is was connected to.

            socket.io has node.js clustering support in combination with redis. While the socket.io documentation site has been down for multiple days now, you can find some info here and Scaling Socket.IO to multiple Node.js processes using cluster and here's a previously cached version of the socket.io doc for clustering.

            Source https://stackoverflow.com/questions/42715006

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install node-redis-pubsub

            You can install using 'npm i node-redis-pubsub' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i node-redis-pubsub

          • CLONE
          • HTTPS

            https://github.com/louischatriot/node-redis-pubsub.git

          • CLI

            gh repo clone louischatriot/node-redis-pubsub

          • sshUrl

            git@github.com:louischatriot/node-redis-pubsub.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link