Group Chat XMPP with Google App Engine - java

Google App Engine has a great XMPP service built in. One of the few limitations it has is that it doesn't support receiving messages from a group chat. That's the one thing I want to do with it. :(
Can I run a 3rd party XMPP/Jabber server on App Engine that supports group chat?
If so, which one?

No. App Engine apps can only directly handle HTTP requests - you can't run arbitrary servers on App Engine.

Related

Is Google App Engine sockets support iOS as client?

According to the documentation of Google App Engine in this URL https://cloud.google.com/appengine/docs/java/sockets/
It said:
Sockets are only available for paid apps, and traffic from sockets is billed as outgoing bandwidth.
My questions is that, Is this paragraph includes iOS Apps too? If Yes, what does that mean?
Google App Engine is simply a web host. The code you deploy there doesn't run on any devices- it runs in the cloud and clients can talk to it. Whatever you deploy there typically offers up content over HTTP, which any type of client can understand.
That paragraph is talking about billing for your web application, that is, the code deployed on your Google App Engine instance.
Thus to serve up content using sockets, you need to have a paid Google App Engine instance. "Apps" does not refer to the client applications.

Mobile back end push and pub/sub (GCM or not)

We already have a quite complex mobile backend written in Java which is deployed and works fine, so we do not have any need to use the Google mobile backend. Now we have requirements for pushing some data from the back end to the phone. Earlier I used GCM regularly. Our first requirement is only simple messaging, but it may evolve to something like a pub sub (phones subscribing to topics).
The issue I am not understanding is should I now use GCM like before, and later develop my own pub/sub overlay, or can I use the products Google has developed for that? Is this even possible, since everything I am finding on Google pages is just related to communication between Android phones via their cloud storage, so no library for communication between a custom back end and a phone?
In short, what should I use, regular GCM or is there something Google is providing which I am not understanding?
You can use regular GCM. A custom back-end can send messages to an Android app via GCM. The library for sending messages from a 3rd party server to GCM still exists (com.google.android.gcm.server package in the Google Cloud Messaging for Android Library), but you don't have to use it - you can implement the HTTP POST requests yourself.

What are the prerequisites for using Google App Engine with Android?

I am new to Android Application Development and know all the stuff, which is required to build an Application which can use the local resources (databases and all that stuff). I want to build an Application, which will interact with the Application server. And I chose Google App Engine as my Application server. As I am slightly new to this topic, I just want to know, what are the prerequisites for doing both client and server side programming.
I would require to store some data on Google App Engine and interact with the apps with reference to the same.
P.S. I have chosen Java as my language with Google App Engine.
I don't think that there is any prerequisites for using android with google app engine.
Google App Engine is a PAAS, u can write the server side and it should work irrespective of Android, iPhone or any other device. For data transfer you can use XML or JSON format, see this if u are interested in creating REST services.Create and Deploy a JAX-RS REST service on Google App Engine
For data transfer from server to android device, u can use Google Cloud Messaging Google Cloud Messaging for Android

Patterns for building chat application with XMPP

I built an Android application with Google App Engine Server. Now I want to add simple chat to my app. And I have some questions.
My users registered with theirs desired email domains like hotmail.com, yahoo.com and even more esoteric domains, thats mean that I need to create JID for them? if so is Google App engine provide JID creations with my app domain that i can manipulate?
I read that Google App Engine act as XMPP client so I need Xmpp Server that can receive and send XMPP messages. So why do I GAE for? is Openfire is my answer? can I integrate Openfire with GAE?
I Also read that if I want to use XMPP in GAE and Android in need aSmack Api for my client and that it is working on HTTP. So I guess that I'll need to poll the server for messages every couple seconds. Is there a better pattern?
can I integrate Openfire with GAE?
You cannot run Openfire on GAE because GAE works only on HTTP so you won't be able to connect over sockets as Openfire does.
My users registered with theirs desired email domains like hotmail.com, yahoo.com and even more esoteric domains, thats mean that I need to create JID for them? if so is Google App engine provide JID creations with my app domain that i can manipulate?
If I understand your question correctly, you shouldn't have any problems here. As long as you're not a spammer, we don't place any restrictions on what domains you can send to.
I read that Google App Engine act as XMPP client so I need Xmpp Server that can receive and send XMPP messages. So why do I GAE for? is Openfire is my answer? can I integrate Openfire with GAE?
You can send and receive XMPP messages via the xmpp API (this is the python version). This calls into the Google Talk infrastructure. You don't have access to what you'd traditionally call an "XMPP server", but you do have access to basic XMPP functionality.
I don't know a lot about OpenFire, but there is a Trusted Tester program for outbound sockets that you can sign up for. This is what you would need if you desire an external XMPP server.
I Also read that if I want to use XMPP in GAE and Android in need aSmack Api for my client and that it is working on HTTP. So I guess that I'll need to poll the server for messages every couple seconds. Is there a better pattern?
I should prefix this by saying I don't know a whole lot about Android or aSmack, but that won't stop me from taking a stab at answering your question. :-)
I think this depends on your usecase, but I can't think of any situation you'd need to do this off the top of my head. Will the user of your application have their own JID on a server they registered for? If so, I don't see any reason you'd have to connect via HTTP, unless that's all aSmack supports. The main use-case for BOSH/XMPP-over-HTTP is in the browser where you don't really have access to open raw sockets.
If you want to use XMPP as a messaging/notification service the user won't know about, it may be more complex. I should note that you can always set up an XMPP server on Google Compute Engine.

XMPP in Google App Engine and Android for a chat application

I want to build a simple chat app where users can send messages to each other.
Can I do it with XMPP service from Google App Engine?
In their tutorials and all the tutorials I found on the web it was an implementation of a bot server. I also found similar tutorials but they are in python.
Is there a good and full tutorial that can guide in server and client side?
Yes, you can use XMPP/Smack library available as a third party library. With this you can create you own custom chat application same like the one's available in the market.
You probably want to use the Channel API if you want to build your own chat app. That's for sending messages to browers.
The XMPP API is for sending messages to XMPP clients. ie if you want to send a message to the chat client that's built into gmail, or a gchat client, or facebook chat.

Categories