Skip to content

Node JS application using MQTT and Socket.IO both. This repository contains single-threaded vs multi threaded node application

Notifications You must be signed in to change notification settings

developeryashraj/mqtt_socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT and Socket.IO Implementation

Node JS application using MQTT and Socket.IO both. This repository contains single-threaded vs multi threaded node application

Do below steps to test this gist!

  1. Download the files and put it in a folder.
  2. Run npm install and add all dependencies.
  3. Now first try single threaded.js by running node single-threaded.js
  4. Then try running node multi-threaded.js

Run below URLs in your browser and check the logs in your terminal for both point 3 and 4.

For more information on clustering and sockets you can go through this Medium Article :- https://medium.com/@jadejayashraj/node-js-cluster-with-mqtt-socket-io-redis-and-sticky-sessions-d5be72ef65f0

About

Node JS application using MQTT and Socket.IO both. This repository contains single-threaded vs multi threaded node application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published