简体   繁体   中英

Is it possible to have a XMPP module inside a Tomcat server?

I'm posting this here because the thread I made on programmers stackexchange didn't get any answer and I need an answer for this rather fast, so here we go:

For a school project we are looking to implement push like technologies in our Android app, we need to send push messages from a server (Tomcat) to the Phone (Android).

After doing some research I've found that XMPP would be a good option for achieving this type of push notifications, now my problem is how I should integrate this with our Tomcat server where all the information and events will happen as well as where all our other pages are.

Is it at all possible to have a XMPP server or module running inside of Tomcat or can I build my own lightweight module(I was thinking something like a servlet) to handle this?

If you have any better ideas on how to achieve push notifications I would be really glad to hear them, whether it be using a totally different approach then XMPP (I've looked at long polling, MQTT and some other things) or some other way to integrate the solution into Tomcat.

The requirements we have is that we must use Tomcat and Android 2.1 (so C2DM is not an option) and set up push notifications between these.

You can probably run some servers within Tomcat, but I don't think you really gain anything from this setup with respect to XMPP. You will in effect have a server running inside of another server.

The only advantage I can see with this is if you want access to the server internals from some other web application, but for that I would either make the web app another client, or build a custom communication module in the xmpp server that the web app can use to communicate outside of standard XMPP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM