I want to add a chat app to my e-commerce website which offers one-to-one chat between the buyers and the sellers. After searching ,web sockets seems to be right for this but it requires node.js server and the rest of my website is in php with apache server. I have read that it is not good to run both apache and node server at the same time. For video chat I'm using appear.in's javascript api which has no such limitations.
How can I run the node.js app under this scenario?
There are plenty of web socket libraries for PHP, e.g. Ratchet.
If this is the only reason for you to move parts of you application to Node.js, you shouldn't necessarily do it.
Related
I would like to build a simple chat app with electron. I wrote a node chat app before using web sockets. Now for a desktop app, I'm wondering how to do networking.
As far as I can see, I have two options: using node's net module, or going through http and actually running a web server as a "chat server".
I guess http has the advantage of being less low-level and more familiar to me, on the other hand I'm wondering if it's not overkill...
Any sugestions?
I am trying to build a desktop app using electron that retrieves mail from a specific mailbox (microsoft exchange server), now, i have looked around and read that mailbox connection should be done server side (the question was made by a guy building a web based app that is a little bit similar to what i want to do), but, since i am not really deploying a node js server but rather using electron, which, as far as i understand is like a desktop app version of node, im not sure on which approach to take. Should i use an api? does microsoft has any interface for this? or should i use a third party integration for it?
It looks like the Exchange Web Services API is only provided as a CLR assembly, so if you wanted to use it you'd need to:
write a C# console app that you then spawn from your Electron app
(and communicate via stdin/stdout), or
use the EWS API in your Electron app via Edge.js
Alternatively, you could probably just directly communicate with the exchange server using SOAP messages, but that could be a bit tedious to implement.
i would like to know if it is possible to have socket.io featured client website to send message to winsock c++ server application?
My current project involve controlling a robot using c++ application and i have design a simple local host website.
i would like to have a web page as user interface (client) and my c++ application (server) that will accept connection from client and listen to the port for incoming messages. ( which mean socket.io interacting with winsock through IP)
I have a working C++ winsock client/server application that are able to communicate between each other using winsock. Besides that, i have play around with the socket.io demo chat from this webpage http://socket.io/get-started/chat/
If so, is there any good tutorial or guideline out there that capable of having the sockets interaction? i have no luck finding one.
Thanks
I want to develop an instant messaging for mobile application, like whatsapp, with nodejs as my backend. I have gone through XMPP protocols and read xmpp.org documentation as well.
I referred to this link and I am able to build some of the basic XMPP functionality like creating and messaging users. But I am still unable to implement the complete functionality of XMPP in nodejs.
So: are there any node js libaries available to build the complete functionality of xmpp protocol, such as asmack? Alternatively, how do I send calls to XMPP server via XML?
XMPP is the standard for messaging. But it is not clear how Node will help you better than an established library on another platform. Node does make it a breeze to do scalable web socket apps, which work a lot better using JSON instead of XML though. So perhaps what you want to do is build a web socket IM application in Node and also implement an XMPP interface.
For web socket and REST implementation: http://express-io.org
For XMPP interface to the Express.io application: https://github.com/node-xmpp/node-xmpp
I'm looking to connect my WinJS app to mobile browser clients via a cloud service that everyone connects to using web sockets.
I built a solution using socket.io that works well as long as my node.js server is hosted on localhost :) When I deploy my server to Azure, the Windows 8 app returns an error saying it can't load external content in a local context (after calling socket.io's connect()).
Looking at the web sockets sample on MSDN, I think that I should use the built-in functionality in Windows.Networking.Sockets for at least what's between my app and the public cloud service as it won't try to load external resources.
My question is: what are the options for the other end of the tunnel? Does it require a .NET 4.5 host with IIS 8 (since IIS 7 doesn't support WS)? I don't think those exist today yet, so I'm wondering what the development story is here.
Depending on what I end up using for the server, I think I'll have to use socket.io again or SignalR to serve the clients (most won't support web sockets and I need a good cross-browser library :))
If your backend is a NodeJS app, you don't need an IIS Server or anything related to the .NET Framework.
A list of hosting providers is maintained by NodeJS' author at https://github.com/joyent/node/wiki/Node-Hosting (The list might be outdated as I don't see Azure there).
I don't see why your server shouldn't work when deployed to Azure. Are you using npm install azure?
I have a feeling that you are confusing yourself regarding Web Sockets and Socket.io.
Socket.io is a realtime transport framework that might or might not use Web Sockets for its transport on the client-side based on the client's browser.
Refer: FAQ — Socket.IO
(Answering my own question)
I was behind a proxy that didn't allow the web socket connection from socket.io in my Win8 app through, and so it fell back on a method that required loading external resources.
Bypassing that problematic proxy, the connection works fine and I can use socket.io from my app as intended. I'm hosting the other end on Azure (per the node.js + socket.io tutorial they provide) and it works. I still don't know what a developer wanting to use the built-in web sockets library should use for a host, but I imagine we have to wait for IIS 8 to be out.
Now I'm left to verify that the app can pass certification with this library.