How to build xmpp over web sockets web chat application like gtalk - javascript

How to build xmpp over web sockets web chat application like gtalk using javascript+html or asp.net?
ıt accepts file transfer, video conferencing, private or group chatting. Multiple users and servers can communicate with each other.

If you want your chat system to work with google's gtalk, or If you want to create your own chat server and make private system you will need to implement xmpp on javascript,
follow the links that will help you
http://professionalxmpp.com/
https://github.com/maxpowel/jQuery-XMPP-plugin

There are two ways to achieve your goal:
You can build your own chat solution from scratch (build backend solution using XMPP XEPs, etc. and client-side app)
To make it easier for you, you can use a ready backend and SDK provided by some BaaS providers. In such way you can concentrate on building client-side solution and its UI while you already have a ready backend and a set of requests to connect to that backend and use it.
You can try ConnectyCube since it has both chat and video chat. For video chat they have two options: WebRTC peer-to-peer solution and SFU based one.

Related

Connecting WebSockets from browser to other applications

Presentation
My application is split in 3 parts :
C# .Net 5.0 desktop application that harvest and distribute data
Angular 10 static application that control the C# app (start/Stop) and
print the data in the form of charts for the user
Azure Function Rest API used as a backend for the Angular Static
Application (.NET core 3.1)
My goal is to have a WebSocket used for "real time" communication between the C# and Angular app instead of relying on Http Request to Azure Function REST api
I don't use a "classic" server like express.js. Azure Function replaces it fully.
Because of that, I'm using the service Azure WebPubSub to host the sockets.
Problem : I cannot connect the websocket I create from Angular (Browser Application).
The problem doesn't come from WebPubSub because the WebSockets are fully working (sending & receiving) between my C# app, Azure Functions and even some node.js test scripts.
Also, my web socket created in the browser app can communicate with itself but no other apps get the message send from my websocket in browser app.
Question : Can I communicate from the browser to others app in real time (websocket based) with my current architecture and if yes, how ?
On the Azure WebPubSub Documentation Page there are no examples of what I try to achieve. Same thing searching on the internet.
A solution using an Express.js server linked to the app, being the could be used as the middleman between the browser app and c# app. But I want to avoid it if possible.
I just want to know if what I'm trying to do is possible.
Also, the app could be re-done in React.js so non-Angular specific answer are better.
The Web PubSub logstream sample:https://learn.microsoft.com/azure/azure-web-pubsub/tutorial-subprotocol?tabs=javascript sounds like a similar scenario.
Your AngualrJS Web App is similar to the logstream's web application, and it joins the stream group.
Your C# .Net 5.0 desktop application is similar to the logstream's message publisher application stream: https://learn.microsoft.com/azure/azure-web-pubsub/tutorial-subprotocol?tabs=csharp#publish-messages-from-client, which send messages to the stream group.

Cross-Browser Communication

I am designing a website that requires a host and client websites. The host will set something up (a session), and the clients will connect to that host using an ID specific to that session.
I have considered how I will facilitate that communication, and initially I was going to have both the clients and the host periodically query and update a database which holds the current states of all clients and the host to communicate new options and changes - but then I wondered if it is possible, using javascript [or something], for them to connect and communicate directly?
The communication would be very simple messages - single strings to communicate current state and stuff like that.
Im pretty proficient in javascript/html/css, but am happy to learn if there is something that would do a better job of setting this up.
Thanks!
Alex
You could try httprelay.io, requires no additional libraries and can be used for simple http client to client communication.
You're looking for WebRTC, which is the de facto and recommended way of doing peer-to-peer connections through the web with pure Javascript:
WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for voice calling, video chat, and P2P file sharing without the need of either internal or external plugins.
And yes, before you ask, simple messages can be exchanged as well.
Here is the Mozilla reference explaining WebRTC.
Here is a nice simple tutorial to get you started with the code.
Here is a peer-to-peer chat room with video capabilities built using pure WebRTC as a demo.
Prior to WebRTC, there was no satisfactory decentralised way of doing this.
As the comments indicate, Websockets would have been the right idea if you were going with a centralised system - they facilitate real-time communication between clients and a central host.
Decentralised systems, however, must be implemented using WebRTC - this is the only option on the cards.

How could I join an IRC channel in-browser using JS?

I'm building a decentralised peer-to-peer application that uses WebRTC, and as part of its bootstrapping process I require to get nodes from a dynamic source.
The IRC bootstrapping method that Bitcoin used to employ worked by joining an IRC channel and decoding all the usernames into IP addresses to get bootstrap nodes. While this is not sustainable (and this is why they removed it) it did help get the clients set up automatically.
I understand that Freenode has implemented purely AJAX web chat using qwebirc, is there any way I could join a channel on Freenode by sending these AJAX requests from another domain?

HOsted XMPP Service with HTTP Developer APIs

Is there any services out there that supports XMPP Server with a developer API that allows xml/json http request to send/receive IMs?
I am trying to build a web chat system that connects to my jaber/xmpp IM client. What I am trying to do is integrate what I currently have in operation for my company but add web chatting.
http://www.olark.com/ provides everything I want as far as features however I want to build my own client interface/architecture since Olark's pricing gets expensive on the scale I plan to role this out in my company.
Any suggestions would be greatly helpful!
oh and on a side note, I am using pusher.com to run my web chatting and it works flawlessly. The problem is that I want to connect pusher's websockets into my current xmpp/jaber network.

Socket.IO Server-Server Communication

We are using Socket.IO to communicate real-time statistics to connected browsers; however due to the architecture of a system we are building we want to allow both browsers and other nodejs servers to subscribe via Socket.IO for statistics. Would it be possible for me to create something like a custom transport for communicating via TCP to another Socket.IO server that had subscribed?
We want to continue to use Socket.IO's built in support for channels and subscriptions, but provide server-server via node.
Thanks for any suggestions!
I also posted on Socket.IO's GitHub Issues Page and got an answer there. Looks like I will be using Hook.IO to do what I need.
Thanks!

Categories

Resources