I want to develop a real time chat application and also want to show real time graph/chart.I am confused to choose technology.I heard a lot of good things about nodejs socket.io and also heard about django channel.Can you suggest me to choose from one of them for my project?
There need a special feature though.I need to run a cron job to get data from external web service and broadcast it to all clients.
Thanks in advance
Django channels is fantastic at broadcasting and creating a chat application. I have successfully used Channels with Websocket and Redis to create a chat application. I am not sure about scalability, but since you're here with this question there may be a chance that your app may not reach a large enough usage frequency to make that an issue.
Related
I am looking for suggestions how to best implement a semi-realtime leaderboard. I have implemented an app in React Native and for the backend I am using NestJS with MongoDB. The app uses Mongo to store several performance metrics generated by the app. In the app I want to show a top-x ranking of the performance metrics from all clients. What is the best way to notify the app that the ranking has been updated by a different client. I don’t need an instant response like a chat app, a refresh interval of lets say 10sec is sufficient. For this phase of the project there will be less than 10k clients. I prefer I can keep using the nestJS-Mongo backend.
I am fairly new to the world of app programming. I tried to find suitable solution online but want to know how this is normally done.
To preface I'd like to say I apologize if this question is too general or has been asked before. I'm struggling with some concepts here and truly don't know what I don't know and have no idea where to look. For context, i'm a full stack dev whose experience has mainly been with writing web servers using Node.js. In such applications implementing BullMQ, bull-board and error-handling is fairly straight forward since you can use middlewares and bull-board ships with server framework specific adapters.
Currently I am working on a project written in Node.js and Typescript. It listens to events emitted by the new Opensea Stream package (a socket based application) and accordingly adds jobs to the BullMQ queue. So on startup it connects to the database, connects to the Opensea socket and then acts accordingly to emitted events. In my mind I would classify this as a Job/Worker/Process sort of application. I've had a couple of issues building out this project and understanding how its made and its place in the web application architecture.
Consequently I have come up with a couple of questions:
What are these sort of applications called? I've had a hard time looking up answers for my questions since I don't know what to categorize this application as. When I try to Google 'Node.js Job Application', as expected it gives me links to job postings.
Am I using the wrong tools for the job? Is Node.js only supposed to be used to write web servers and not for such job based applications?
How does error-handling work here? With web servers if an error shows up in the server, the middleware catches the error and sends a response to the client. In such job applications what happens if an error is thrown? Is anything done with the error or is it just logged in errors, is the job reran/cancelled etc?
How do I implement bull-board here to graphically observe my queue? Since i'm not using a web framework here in this application how is the integration done? Is it even possible?
How different are socket based architectures to REST API servers? Is it a completely different use case/style of implementation or can they have the same server architecture and are just different ways of communicating data between processes? Are sockets more for microservices?
Are there any resources or books that detail how these applications are supposed to be built? Any guidance on best practices or architecture would be greatly appreciated.
I am trying to build video conferencing web application where multiple people can join the call and there will be video/audio/data transmission. I researched a lot for this. What i understand is we can achieve this using webRTC protocol. I started doing research for js libraries and i came to know for simpleWebRTC. I want to develop with backend as a django. I tried to run sample demo code from https://www.sitepoint.com/webrtc-video-chat-application-simplewebrtc/. but i am not able to establish connection with socket.io which is simplewebRTC signaling sandbox server.
I tried with node express server as well, but still i got the same error:- net::ERR_FAILED. This error occured in simplewebrtc-with-adapter-js while making connection.
What would be the correct technologies to achieve this type of functionality?
Front-end webRTC libraries:- simplewebRTC/ EasyRTC/ Any else apis?
Signaling mechanism:- What and how can we use to connect with webRTC?
Backend:- Node js/Django?
I still confused with the signaling protocols/STUN/TURN servers as we have to define the servers by our self. simpleWebRTC is not providing that which we can use in production.
Any help would be much appreciated!
I just started a video calling and chat application as well. open-easyrtc, no problems so far, their demo just works after npm install.
As for signaling servers, since I just started I haven't concerned myself much about them but the most I can make out of it is it's used for exchanging information like video metadata, network information, etc. open-easyrtc comes with public STUN and TURN servers, not sure about the limitation especially if you're going to have a lot of users.
It's also possible to deploy your own, I'm looking at learning more about coturn
once I finished developing my application.
You can use simple-peer, a simple library for webrtc. Here is an example project with multiple users project, DEMO.
Hello !
A bit of background, I'd want to create my first android/iOS/webapp. The idea is to create a cross platform chat using :
Ionic (and Javascript) for the app
Openshift for the node.js server part
I was going to use Firebase to store the messages, but the free plan just works for 100~ simultaneous users, which ain't a lot ... So I was thinking about creating a node.js server using MongoDB to store everything. Users and messages.
The idea is that I'd get a better server side control on the data, and it seems to be nicer to me.
But is it actually a good idea ?
I'm not sure about the fact that it's pertinent to use a node.js server for that matter, I'm pretty new to those technologies (I'm a Java/COBOL developer)
Thanks in advance !
tl;dr : is storing and processing data for an iOS/Android/Webapp chat with a node.js server is a good idea ?
I think it's a good idea, in few hours you would have a working environment. With Ionic, being web technologies, you can use any library you want, probably the easiest one to use could be socket.io, is simple to use client side and simple server side. You would have rooms and everything already to exchange messages in realtime.
There are a ton of examples for using socket.io to make a chat so should be pretty easy to find infos. ( I made one myself )
I am developing a chat application using the nodejs/socket.io on the server side
Now, it is time to test how scalable it is
so, i think i can simulate a large number of soket.io clients effectively using nodejs also , but running the client code this time
the question is, How can i run the socket.io client library on nodejs? is this possible?
if so, can anyone please provide a simple example
my code is running fine on the browser, with the usual development load, the issue is not about the code is running or not, actually i am not planning to run the same client code, just openning a large number of connections , and sending thousands of messages to have a preliminary figure about scalability and resource consumption
also, any suggestion on testing socket.io server scalability will be appreciated
thanks a lot
What you're looking for isn't going to really be helpful. Even if you could simulate client-side socket.io in a node process, it wouldn't have the same dynamic properties as actual access from browsers. You'd be able to determine things like the maximum number of connections you could handle without running out of resources, but your general performance metrics would be pretty artificial and not generalizable.