what is the best server to make chat app in android? [closed] - xmpp

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to develop a chat app for android users app will be native and I want to know which will be more easy for me using firebase or XMPP?

Firebase
Firebase is a real-time database that uses Websockets and MongoDB. You are given full control over the database schema and all the code that’s used to interact with the server is defined on the client side. Here are some benefits and drawbacks:
Performance Websockets and MongoDB allow high performance and a lot of concurrent connections
Flexibility You can make the data structures you need. If you wanted to send new message types like a survey message, you could. You could also support WebRTC and use Firebase for signalling.
Persistence You can automatically back up messages on the server so if a user loses their device, they could just synch with server and get their messages back.
Frameworks There are existing frameworks that already provide messaging on Firebase. The Chat SDK has a framework for iOS and Android which are available for free on Github.
Fat client All the messaging logic is defined in client code which means to add a new platform, you have to re-write all the code.
Not Specialised Firebase doesn’t define any protocols so you would have to invent this yourself. You would have to decide what information to include on a message, and how to structure the database
XMPP
XMPP is a server that is specifically designed for messaging. As far as one exists, it is the industry standard messaging protocol. It’s used by big companies to power messaging for millions of users. It’s used in Skype, Facebook messenger, WhatsApp and Google Hangouts.
Performance XMPP servers can be clustered scaling to tens of millions of users
Open Source There are a number of excellent open source XMPP servers - ejabberd, OpenFire, Prosody
Defined Protocol XMPP is a well defined protocol. This means that in theory, any XMPP app can function with any XMPP server
Thin Client The XMPP server provides all the business logic and the client just sends and interprets a stream of XML messages. This makes it easier to deploy on multiple platforms.
Hard to setup XMPP servers can be difficult to setup and maintain
Complex development Developing a client for an XMPP server can be much more difficult and time consuming that using Firebase because the protocol seems dense and archaic at times
Bugs Unfortunately the protocol isn’t always followed correctly which can lead to bugs

Related

Suitable protocol for Instant Messaging

We have to develop a native mobile app for Instant Messaging using a SUITABLE protocol.
Also we are to develop a website for that application so that those who cannot login to mobile can continue their Instant Messaging through the website.
Later on, we would be adding the facilities of voice and video calls to the both native mobile app as well as the website.
Now my question is that, based on the above situation, which protocol we should go with?
I did some research on the internet about that and am unable to choose amongst XMPP, MQTT and MUMBLE.
Which one would be the best among them for the above criteria?
Also should I be using the same protocol for both the mobile app as well as the website? (no idea at all). Does choosing either the same or different protocols for native mobile apps as well as a website matter at all?
Consider me a novice here.
Your response would really mean a lot to me.
I am new to web development so correct me wherever I am wrong.
The answer to your question XMPP vs MQTT vs mumble really depends upon a number of factors that you did not describe in your question. Mainly on your non functional requirements.
XMPP is an xml based protocol originally designed as an instant messaging protocol. It has quite a high overhead in terms of number and size of messages in handling presence between all the clients. You could certainly base your implementation on XMPP. Google talk is based on XMPP and it uses XMPP to set up VOIP sessions using an extension to XMPP called Jingle.
MQTT is a general purpose low overhead publish/subscribe protocol. It is not specifically targeted at implementing instant messaging however Facebook uses it as the basis for their Facebook messenger. MQTT is a more efficient protocol in terms of its message size and its keepalive requirements so you might choose this if you plan to scale up to very large numbers of users or if you need your mobile clients to be highly responsive, even on low capability devices. If you choose MQTT then you will be left to design the "application level" protocol messages yourself, rather than following a standard. MQTT can certainly be used as the transport over which to set up voice chat and video streams.
You do not need to use the same protocol for mobile client versus website as long as your server side can appropriately process the interactions with mobile clients and web clients you could choose different protocols.
Facebook messenger does support voice messaging....
http://mashable.com/2013/02/21/facebook-voice-messages/

Socket connection between rails and iphone native app

I have an iphone app with rails serving as a backend server.
Now I need to implement a chat functionality using sockets connections.
A lot of examples show you how to implement chat using sockets in browser.
What I need here is how I can implement an application where you create socket server in the rails app , and the client in iphone app which listens to the channel I give them.
I tried using faye(examples given only how to implement client in the browser) and using fayeObjC library for iphone to create client, but am not able to listen to the channel from this library.I know I must be implementing it wrong here.
I'll share my code also here, but first I need to know is there a better solution than this?
Also I appreciate some links to some examples where socket server is in rails and clients are iphone app.
Appreciate any help and mostly need a right direction to implement it.
Update
I tried the faye combination again and it worked.Although still looking for more solutions.
You can check about TCP sockets:
http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server
Chat Application Using Ruby
http://quickblox.com/modules/chat/
http://caydenliew.com/2011/11/ios-mac-os-communication-with-asyncsocket/
http://www.macresearch.org/cocoa-scientists-part-xxix-message
Next link is a comprehensive Networking Guide - Using Internet Sockets
You must keep in mind two major problems to peer-to-peer communications (Chat): reachability and how to receive new messages while your application is in the background (get notifications).
For the last you can use APNS approach: an invisible notification will be pushed to the iPhone indicating that a new message is ready to be read. So your app will make a request for unread messages (what app like WhatsApp does).
Besides TCP sockets you could use websockets (HTTP - so there are no firewall problems).
Best in class - Socket.IO.
Here you will find the wiki https://github.com/learnboost/socket.io/wiki (you will find there an extension for Ruby also)
Here an example for iOS chat client for socket.io & node.js backend
Jabber
Another option: XMPP - "stands for eXtensible Messaging and Presence Protocol. Such a protocol is open-standard and oriented to message exchange (builds and maintains by Jabber community). Message exchange happens near real time, so it is an ideal infrastructure to build chat-like applications. The protocol also implements a mechanism to notify presence information (whether a user is online or not) and the maintenance of a contact list. XMPP is a thorough protocol, which has been adopted also by big companies like Google to build their Instant Messaging service."
Here you will find all about developing a Jabber Client for iOS (enable users to sign in, add buddies, and send messages; how to install and configure a jabber server, create accounts, and interact with the server from an iOS application http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/
I know that SocketRocket by square is a strong native Objective-C library. But it doesn't offer the channel abstraction you seem to be looking for.
If you would consider outsourcing the WebSocket connections then you could use a hosted service like Pusher, who I work for. You can publish messages (trigger events) on channels using the pusher-gem. And you can subscribe to channels and receive messages using one of Pusher's Objective-C libraries.
Other solutions will also have Objective-C libraries and you can find a list of them via this realtime web tech guide.

How can I start to build voice chat application iPhone? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 months ago.
Improve this question
I want to build voice chat application for iphone.
After surfing and searching i conclude that for making of voice chat app i have to use VOIP/SIP protocol.
So my question is that,
It's necessary to use VOIP/SIP protocol for voice chat? If YES then how can i use VOIP/SIP in my app? Is there any tutorial or blog which explain step by step implementation?
And if it's not necessary to use VOIP/SIP then what is the alternate way for developing Chat application ?
Thanks in advance.
It is not necessary to use SIP. SIP is one of the umbrella standards that enable you to create multimedia sessions of any kind, however with SIP you will also have to implement a number of other things - Offer/Answer model using SDP (Session Description Protocol), use a RTP (Real time protocol) for actual voice transmission, likely MSRP (Message Session Relay Protocol) for session oriented messaging and then possibly look at Presence and whole slew of standards under SIP/SIMPLE.
Now you don't have to do it all and it all depends on what you want to do and how many and what types of other clients and 3rd party servers you want to interface with.
Have a look at existing free SIP software and see what makes sense for you.
Alternatively have a look at XMPP which is more suited for chat and presence kind of requirements. Specifically look at Jabber and see if that makes sense.
You do not need to use SIP. For example, ConnectyCube video solution is based on XMPP for chat and signaling to establish the connection before the call and WebRTC standard for video calls. You can check code samples to see how they implemented it on iOS.
To try the solution you can register a free account. If it suits you, you can use their SDK to speed up the development.
The benefit of using a ready backend with SDK is also that you do not need to worry about setting up a STUN/TURN server for routing video calls. They have a shared one you can use.

VOIP using XMPP Framework in iPhone [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am able to implement Facebook and Gmail chat with the help of XMPP Framework in my iPhone app. Wanted to know if its possible to implement VOIP(SIP) in a similar manner using XMPP.
You can use jingle framework.This is what jingle wiki says:
"Jingle is an extension to the Extensible Messaging and Presence Protocol (XMPP) which adds peer-to-peer (P2P) session control (signaling) for multimedia interactions such as in Voice over IP (VoIP) or videoconferencing communications. It was designed by Google and the XMPP Standards Foundation. The multimedia streams are delivered using the Real-time Transport Protocol (RTP). If needed, NAT traversal is assisted using Interactive Connectivity Establishment (ICE)."
The libjingle library, used by Google Talk to implement Jingle, has been released to the public under a BSD license. It implements both the current standard protocol and the older, pre-standard version
Also there is a framework in Google project repository.
http://code.google.com/p/libjingle/
Also, one more link related to this:
iOS: Open Source VoIP/SIP Objective-C Code
May be this will give you an idea.
Its possible to implement VOIP using XMPP. For ios many are providind SDK's which you can easily implement in your code. Among that one of the best is QuickBlox, which is very useful and easy to implement. Its providing P2P video chat, text chat , group chat and file transfer facilities.
But now WebRTC is gaining much popularity for VOIP purposes.WebRTC (Web Real-Time Communication) is an API definition being drafted by the World Wide Web Consortium (W3C) to enable browser to browser applications for voice calling, video chat and P2P file sharing without plugins.
Open Tok is a rather useful product which can be used for VOIP calling in ios devices. They are also providing a basic IOS sdk for easy implementation.
checkout these two products:
1- monal: https://itunes.apple.com/us/app/monal/id317711500?mt=8
2- talkonaut: https://itunes.apple.com/us/app/talkonaut/id375113323?mt=8
they both claim to support jingle

iOS devices as web server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I saw there are several apps on App Store that allow other computers to make a http connection to the iPhone/iPad devices to transfer files. It seemed like a web service is running on the iOS device. Just curious how is it done /what class was used?
Thanks.
Just display the devices IP address, open a socket for listening in an app running on the iOS device, and implement the http protocol. There are several 3rd party libraries that can do most of the heavy lifting for you:
CocoaHTTPServer or iPhoneHTTPServer3, or SimpleWebSocketServer, or MultithreadedHTTPServer3
You can use GCDWebServer
It's a modern web server for iOS and MacOS based on grand central dispatch.
Like answered before the best choice is to use a 3rd party library for this. There exist mainly two libraries to get the job done: CocoaHTTPServer and MongooseDaemon.
Both of them have an Objective-C API but MongooseDaemon is just a wrapper around the Mongoose HTTP server written in plain c, whereas CocoaHTTPServer is completely written in Objective-C.
We decided to go with CocoaHTTPServer because of a few simple reasons:
Even the simplest property like setting the document directory for the HTTP server does not exist in MongooseDaemon. You have to change a #define in an included source file to be able to change it from the default one, which points to NSHomeDirectory().
As of now the MongooseDaemon library contains warnings about deprecated methods used within the Objective-C wrapper.
CocoaHTTPServer is aware of things like Bonjour or WebDav whereas Mongoose just delivers the basics.
CocoaHTTPServer comes with many examples that range from simple HTTP servers, passwd, SSL/TLS or WebDav HTTP server.
CocoaHTTPServer works with GCD to enable multithreading.
MongooseDaemon is also a good choice.
https://github.com/face/MongooseDaemon