Technology Stack advice for live chat between different domains - javascript

I am working on a pilot project. It’s a web-based chat application (say abc.com). I created a chat window (just the basic UI). What I wish now is from this chat window to chat with a customer support person who is on a different domain.
Say for example, there is an e-commerce website xyz.com and they have a live chat support available in their website. Is it possible to chat with the support person in xyz.com from abc.com?
I researched a bit on this and found out this can be accomplished using WebSockets. Can anyone throw some more light on this like whether it is feasible, the technology stack which can be used / researched further for this project etc.?

For a simple demo of a chat application which uses WebSocket take a look at https://demo.crossbar.io/chat/index.html#ch1. This works across domains without a problem since all chat clients connect to a central router which distributes the messages. (Bonus: there are also clients for WAMP, the protocol this uses, for quite a few languages besides JavaScript, making adding components in other languages a breeze - see http://wamp.ws/implementations).

Related

Can we Use server side scripting for both web and app?

I am new to programming field and I am basically trying to built a system based on web and app which is web based where two users can communicate and buy products from each other on my platform. The question I want to know is there any sytem if i can just code server side logic and connect front end of both web and app to the same logic which is saved on the server.....I hope am able to clearify my question...sorry for the bad english
I was looking for different solution but can't find a reliable one
yes, you can connect your website and flutter app, by using http pub
and get the data from api.
or you can build your website with flutter and in the same as app.
I hope that is answer your question, if not please explain more about what you mean

What are the risks to deploying my nodejs app on a web server like siteground as opposed to an internal server?

I have just built a nodejs app (with HTML/JavaScript/css) to handle (among other things) workflow management for my business. I am currently running it on a local computer on the network so it is accessible to all the staff who connected to office WiFi.
So that staff can access the system from outside the office I’m considering grabbing a cheap URL and deploying it on a web server (siteground specifically because I have a reseller account there). However because this is the first web app I’ve built from the ground up I just know there are going to be security vulnerabilities and the like in my coding.
The kind of data that is included in the MongoDB database is fairly basic, just customer/supplier contact information and product information.
How dangerous is it for me to do this, is it something I should worry about or should I be okay? I don’t plan to have it indexed by search engines, it’s only for staff use so I don’t need customers to be able to find it.
Appreciate any insight from people who have been doing this longer than I have.
Thanks in advance!

User Authentication on Github Pages

I am trying to build a website on GitHub pages. This website will have User Authentication ( think of Login ). Each user will have some private pages which only he is able to access. Since GitHub only allows Static Sites, I am unsure if this is even possible here.
Since I am a complete novice to website development I don't know how this will work/ whether this will even work ?
I know that GitHub Pages do not support PHP but they do support JavaScript, thus is there any way possible for this to be implemented ( even if it includes using third party apps/ websites )?
I don't think it's possible.
GitHub only allows Static Sites
So you won't be able to store any user sessions on Github. There's likely something "creative" you can do to manage users or sessions using Javascript and/or by making requests to 3rd party sites but it's likely not going to be worth the effort, especially if you are a complete novice to web development.
Many web hosting providers offer free or trial accounts, I would suggest trying those or running a VM locally while you learn.

intergrate live group chat in node js web application

I have developed a web application using node and backbone js which is in beta now. Now my client wants group chat to be integrated in that application. This chat should take place between users that are signed in to application. Is there any chatting tool that can help me to achieve this? Or I need to implement this by myself? I have never integrated chat in any web application before. I tried to google about customer-to-customer chatting tools but did not get any tool that can help me achieve this.
Since you are using node you can check socket.io for implementing real-time communication between users of your application. With node and socket.io out-of-the-box functionality exists for separating users into rooms for group chatting (and broadcasting)

See and talk to your currently online users on your site in a Ruby on Rails 3 application

I have a Ruby on Rails 3 application, and I want to be able to see a list of who is currently online. For example user1, IP address, and country. I then want to be able to open a chat / push messages to this user until they leave my site.
How can I accurately monitor who is currently on the site and instantly remove the user from the list when they leave?
I then can talk to them via faye pub/sub.
How can I accurately monitor who is currently on the site and instantly remove from list when they leave?
Well using HTTP you can not do this "instantly" in a browser. Almost all solutions I see use a heartbeat technique. Every X seconds, a request is sent from the browser (using Ajax), that tells if the user is online. If you haven't heard from the user in x heartbeats, you regard the user as disconnected - even Facebook uses this, it seems. I will recommend you to drop your requirement for instant, unless it's really important.
Another approach is to implement Flash or Silverlight, to make a socket connection to the server. But the demand on the server is high, and if many people is on your site, you will run into trouble with ports and so on.
I think this is not so much related with Ruby on Rails... but this is very hard to implement in HTTP with a scripting language only. The server does not know whether a user has closed the browser or not. The server just sends the requested page data to the user and closes the connection.
You would rather have to integrate Ajax or Flash to make things easier. I have seen some people developing chat programs with Flash, and it seems to work much better than any other Ajax-implemented chat programs.
Chat is very unfavorable in a web browsing context, since the page will be reloaded as the user clicks a link. If you are thinking about building an application that only supports a chat feature, you probably want to look something other than Ruby on Rails. For example, Node.js will be a good one.

Categories

Resources