Smack xmpp automatically disconnected using smack 4.4.4 - xmpp

Earlier we have used smack 4.3.4 and Xmpp connection working fine . When we upgrade to smack 4.4.4 , we are facing Xmpp automatically disconnected while device is idle.

You can check server's Idle Connections Policy and increase the time out, or you can ping the server at some interval to keep the XMPP connection alive.

Related

In Azure SignalR Service, what is a Concurrent Connection?

The pricing for Azure SignalR Service is based on Concurrent Connections.
However, I can't find the definition of a Concurrent connection.
I have an ASP.Net Core MVC Web Application. I understand that the server application connection to the Azure SignalR Service is one connection. Each client (browser) that connects to my web app is another connection. But are these considered concurrent connections? Or just open connections sitting there waiting for a message to be sent?
I'm hoping that the count of concurrent connections is a count of connections that are actively sending a message. Is that the case?
Ok so I figured out that a Concurrent connection is any connection to the SignalR Service!
I ran through the quickstart tutorial here
And then used the Azure Metric as I connected various clients to the chat room, and this is what I found:
After starting the app in debug mode, it seems the server immediately uses 5 connections. Then, as I open the url in various browser tabs, a new Client connection is established. As expected, the 16th browser tab does not establish a SignalR connection (Because I am on the Free SignalR Service tier, which has a limit of 20 connections.)

How should I deploy XMPP server GCM on java so as to GCM can reach it and send the message?

I have XMPP server on java, that has to receive messages from GCM server (now it is Firebase Cloud Messaging) I followed with this tutorial:
http://www.grokkingandroid.com/xmpp-server-google-cloud-messaging/
I have wi-fi router and I can not open any ports on it.
How should I deploy this server so as to GCM can reach it and send the message ?
Wi-fi router was not the problem, I don't need to open port for my server in order to GCM server will have possibility to send message to my App server
Library Smack https://ru.wikipedia.org/wiki/Smack solved all this questions
so I don't need to deploy my java server somewhere, it can be launched on my PC.

iOS App XMPP chat server requirements

We are planning to start a new iPhone chat app using XMPP. We didn't have any online VPS server now. We have a local server, on that openfire & XMPP is alredy installed. (We are using it for our local network chat on computers)
So my doubt is that can I start working on the iOS app with that local server now and later (after completing the app) is it possible to change to the online VPS server or need to start with online VPS server ?
Thanks in advance.
Its possible.
I started to develop the app on the local server by setting the xmppStrem hostName as the local server IP address.

Strophe connection did not restore connection after some time

I am using strophe.js to intract with xmpp . it has the feature to restore its states when network fluctuate. this work okay for short time but when network got connected after 5 to 10 min fater disconnection it didnt restore its connection. any ideas why this it is so?
You can use connection manager for this. see this one
Basically what you to do is that start a timer when network get disconnected and in that timer check network connection. once network found connected relogin the strophe to make it working.

How to avoid long-lived tcp connection in XMPP so that server can handle millions of users?

If answer is "using xmpp BOSH", then to use BOSH, we need to have in-between CM (Connection Manager) server that would interact with xmpp server. So that xmpp client to CM interaction will then happen over normal http protocol (which will be scalable), but again CM to xmpp server will happen using long-live tcp connection which will cause scalability issue.
How can we make xmpp client-server more scalable??
Bidirectional-streams Over Synchronous HTTP (BOSH) is basically a technology to keep the connection alive to allow the system to send and receive the data to and fro. To be able to use xmpp over the HTTP, you will have to use BOSH.
For you concern about the scalability, you can basically use components which are meant for scalability such as Nginx a component in place of Apache httpd, also there are many connection managers available with Punjab being the most scalable of all. If you are using Openfire as a XMPP server, it has a prebuilt connection manager which has proved scalability.