Node.JS Voice over IP Electron - node.js

I am fairly new to Node.JS, but I want to code a Voice Chat Program which uses the Electron Framework for the Client.
The Server shall be hosted on a Linux Computer. I want to connect with multiple Clients to this Server and talk and recieve audio from others connected. I want this as a Project so me and my buddies can talk over a piece of software I made.
As I pretty much don't know much about Streams in NodeJS. Which protocolls can I use, for best quality and low network bandwith.

Related

How do i handle PeerJS web RTC with live video stream server?

Good day fellow developers,
Recently i just developed web RTC using PeerJS, it works correctly no problem, until i handle 5+ clients, the internet on the devices are just giving up, they can't. And this one is what i just discovered on the documentation page:
Data sent between the two peers do not touch any other servers, so the connection speed is limited only by the upload and download rates of the two peers. This also means you don't have the additional latency of an intermediary server.
Which is why the client devices are giving up, how do i make livestream server that handle peerjs? i've googled and i only found the live stream server for OBS, i want the server to handle PeerJS WebRTC like BigBlueButton.
Thanks in advance

Raspberry Pi video streaming with lowest latency possible via a server to multiple clients

I want to build a video security infrastructure with raspberry pis.
Please take a look at the rough layout I've in mind:
What the system should be capable of:
The RPis need to stream a low latency video to the
webserver, which displays it to all clients visiting the website.
If a client authenticates he can control one RPi sending commands that gets translated into GPIO commands.
All RPis should be controllable simultaneously by different clients in realtime.
Some kind of scaleability (Clients + RPis)
My Questions:
I wanted to program everything in node.js. Good idea?
Could WebRTC and Sockets.io help me in this project - if not is
there another library that would help me out?
How many clients could a VPS Server (8GB RAM, 4 vCores) handel in this setup?
Is it possible to bring the latency down to < 2 seconds or more?
Anything helps! Thanks!

WebRTC NodeJS Server Architecture

I'm interested in building a web application similar to TinyChat where multiple users can be in a room and broadcast their audio/video feeds to everyone else in the room. I've been looking at WebRTC and it looks pretty easy to get started with a P2P setup, but I'm having trouble finding out how to do WebRTC with a client/server architecure.
I've watched Google's presentation video on WebRTC and the different network topologies common in working with WebRTC. The one I'm most interested in is that in working with an MCU where the MCU is responsible for broadcasting the data to everyone else in the room, thus eliminating P2P.
My question is, how would I go about this? Are there any working examples? Prefferably, I'd like to work with NodeJS on the server-side but haven't found any libraries for handling it. The only two things I have found are Kurento and Licode, but they both appear to be more than I'm interested in at this point in time. I'm basically just wanting something that takes the WebRTC connection and then broadcasts it out to the appropriate users in the same room. I'm not worried about transcoding, muxing, or recording right now.

Realtime Bi-direction Socket

I have an Arduino loaded with sensors connected to a Raspberry Pi. The Arduino passes all the data from the sensors to Raspberry.
Now I want to push all of these data in real-time over a socket to a server in the backend, and upload the data into a database.
I'm looking for the most optimal solution for this. Socket.io seems like a popular solution and relies on WebSockets and NodeJS.
Pusher seems like a decent API service that can easily integrate into iOS and Android devices.
What is the best solution out here? It seems like WebSocket is the way to go, but is there a better protocol to use for this purpose?
Check out the MQTT protocol as well. It's becoming widely used for this kind of purpose. You can find both open-source and commercial, as well as cloud-based and self-hosted, MQTT brokers.

Controlling an Arduino over the web with the lowest latency

I have an Arduino board in a location, and a webserver.
I also have a website that is supposed to control the Arduino. What technique would allow users to take control of the Arduino board with the least amount of latency?
I have Node.js, socketserver, Jabber in mind to experiment with, but is this the right direction?
You should have a look at Socket.IO for implementing WebSockets on server- and client-side.
There's a great project called duino for accessing Arduino with Node.js, you "only" have to pipe all communication through WebSockets.
Update: In the meantime I have published a framework for sending commands to an Arduino with Node.JS, JavaScript and WebSockets. Make sure to have a look at Noduino!
I had good luck using node-serialport to talk to the Arduino. Using the serial port results in very low latency, and I used it to build a photobooth. The code is on GitHub if you want to check it out, though it's very poorly organized as I was rushing to get this done for my wedding and well... corners were cut.

Resources