1

I have a scenario , where i need a Chat client for android and iOS and a XMPP server either setup privately or hosted. I need to call three APIs from mobile app (chat client) and from web based app.

1) Need API that can register a new user with XMPP server so in future if there is call from chat client to xmpp server, server can recognize it.(mobile app will call this api)

2) Need API that can create chat groups. (web based app will call this api)

3) Need API that can add user to chat groups and can create session for the user for particular chat group (mobile app will call this api)

Do i need to create above APIs as custom APIs in some existing XMPP server or i need to create my own xmpp server ?

Please suggest any good XMPP server which fulfill my requirement.

I am not sure how can i proceed with above requirement.

Note that i would need it in .net technology.

Hammad Nasir
  • 119
  • 1
  • 11

1 Answers1

0

As server, you can use more or less what you want. For sure Openfire and Ejabber are largly used and supports more or less all XMPP specs.

About API: you have 2 choices:

  1. get "best" API for each platform, so do for each platform you need it's own client (best as performance)
  2. use a javascript API and wrap a HTML + JS client in your declied-platform application.

This is the list of API: https://xmpp.org/software/libraries.html

it's hard to suggest something particoular due to varius linceses.

As I know, Smack it's a very complete API and works with Android: it's not that easy to use, but Bubbler is (even if not all it's supported).

About js: strophe.js supports chat and groupchat

About session: it's 75% Server and 25% API. Api just require connect and login, server will store the session.

About creation: Smack does, have to check for others API. However write this kind of function it's not that hard (XMPP require a fixed template XML, just replicate this XML). Of course it's better to have something already cooked, tested and ready but a single functionality can be developed in short time.

MrPk
  • 2,862
  • 2
  • 20
  • 26
  • Thanks for the reply but i need some clarification i think my question was not clear enough. Regarding Ejabber will we have to deploy it as XMPP server at our site or they provide the service ? – Hammad Nasir Jul 14 '16 at 09:37
  • All servers are standalone (so you need to "deploy", even if it's just an installation + run + let the IP available) BUT you can use an open server for your users. But you'll encounter a lot of side-effects: what about if you want to customize something? You'll cant. What about the user database? You'll don't own it. What about if you'll try to register an already registered user? You'll can force a prefix for your users, but you'll never be sure this remains unique. However, this is the official list: https://list.jabber.at/ – MrPk Jul 14 '16 at 09:44
  • we dont want to use public server, i was asking if they provide some commercial XMPP server so we can buy those servers to integrate our android or ios app with that . which one is good? buying service(xmpp) or deploying own server ? – Hammad Nasir Jul 14 '16 at 09:49
  • You know if money worth the time. With your own server, you'll pay less the hardware (if you already have a public machine - server) but you have to care about security, if you think you'll need. Install Openfire it's quite easy. If you'll buy a service, this work it's made for a fee and I can't really suggest if the price it's worth for you. If you have strict time probably yes. More, "deploy" doesn't require any servlet container or AS, so no problem about that. – MrPk Jul 14 '16 at 09:54
  • ok we dont have any issues with money right now we can buy a server. main concern is server should be able to integrate with android and ios chat clients. do ejabber or open fire provide some ios or android chat modules along with server ? – Hammad Nasir Jul 14 '16 at 09:57
  • Server it's absolutely independant from platform. Server recives XML, parses XML, do things with XML and dispatch XML. API are declined for env but they don't really manage the GUI, so basically you have to think to have a layer that is the server and like a Saop-ws talks with API Layer that can be integrated as you wish on GUI layer (merged or by using a pattern and in any languange, from HTML up to Swing). Probably some API have GUI layer merged inside API layer, so have interface component, but I really don't know wich one, you can check docs for each API (probably commercial ones have) – MrPk Jul 14 '16 at 10:56
  • so ejabber will give us package which will we install on server that will make a xmpp server and we will have to call its api in order to communicate with server. e.g. registering a user we can call ejabber api from mobile app. ? – Hammad Nasir Jul 14 '16 at 11:06
  • This is going too far, out of StackOverlow Q&A. I suggest you to read some documentations. Keep in mind that XMPP API can talk with any XMPP Server and vice-versa. – MrPk Jul 14 '16 at 12:39