How do XMPP recipients get messages?

184 views
Skip to first unread message

Mark

unread,
Oct 26, 2009, 1:15:39 PM10/26/09
to Google App Engine
Hi,

I just saw the addition of XMPP messaging support to app engine.

I'm not understanding how we integrate this into our apps though. It
looks like we can let users send an XMPP message to another user
directly through our own apps.

How and when do recipients get those messages? Do they need to be
logged into a 3rd party chat service to receive those messages?

Example, through my web app, I allow users to send XMPP messages to
b...@gmail.com. Can Bob only get those messages if he logs into gmail?
Or is there a way for my app to directly be notified of their arrival
and display them? (I would guess no as that would require some client-
side polling or long-lived connection to work).

Thanks

Wooble

unread,
Oct 26, 2009, 3:04:57 PM10/26/09
to Google App Engine
The XMPP service only allows users to send XMPP messages to your
application, or for your application to send XMPP messages to
subscribed users. I don't think it's really designed for you to have
your users send messages to other users through your application;
wouldn't it make more sense for them to just send to the other person
directly?

Mark

unread,
Oct 26, 2009, 7:14:43 PM10/26/09
to Google App Engine
> wouldn't it make more sense for them to just send to the other person
> directly?

Well I think that definitely makes sense in a lot of cases. If I
wanted to make a multiplayer chess game though, it would definitely be
more convenient for users to send and receive xmpp messages directly
through my application though. It would be awkward to go to gchat etc
to send a message to talk to the person you're playing against.

In the chess game scenario, it seems you would be able to send an xmpp
chat message to your opponent, just that your client app has no way of
getting notified that a message was received - it would popup in your
third party chat app, like gchat, probably in another browser frame?

Thanks

Roy Smith

unread,
Oct 26, 2009, 11:30:29 PM10/26/09
to google-a...@googlegroups.com

How and when do recipients get those messages? Do they need to be
logged into a 3rd party chat service to receive those messages?

Logging onto your app and receiving messages from it are totally independent. Your app will send an XMPP Invite to the recipient, which the recipient must accept. After that he will receive messages from your app in exactly the same way as if they originated from a person. That is, he can receive them in gmail, in a gtalk widget, the gtalk app for windows, any other XMPP client such as Pidgin.

Backpack

unread,
Oct 27, 2009, 10:46:48 AM10/27/09
to Google App Engine
Yes you can send messages to other users of your game, but you have to
have them connected in real time to your bot. There are different ways
of doing this with ajax, comet, flash and java. The only one I believe
it works with GAE is a java applet with sockets (waiting for the
future WebSockets implementation).

Every player loads the applet to communicate in real-time with the
xmpp bot which parses and channels responses accordingly.

I'd like to see your chess game finished, if you need help let me
know, I'll be glad to lend a hand.

Vijayakumar Subburaj

unread,
Oct 28, 2009, 5:40:32 AM10/28/09
to Google App Engine
On Oct 27, 12:04 am, Wooble <geoffsp...@gmail.com> wrote:
> The XMPP service only allows users to send XMPP messages to your
> application, or for your application to send XMPP messages to
> subscribed users.
...

Would it be helpful If I want to implement chat functionality for
users logged into my system, or, should I do it without xmpp.

Nick Johnson (Google)

unread,
Oct 28, 2009, 6:52:10 AM10/28/09
to google-a...@googlegroups.com
If it's only between users using your site, there's no need to use XMPP. The XMPP API is designed for interaction with users using Instant Messaging clients.

-Nick Johnson





--
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047

Backpack

unread,
Oct 28, 2009, 11:14:14 AM10/28/09
to Google App Engine
> If it's only between users using your site, there's no need to use XMPP. The
> XMPP API is designed for interaction with users using Instant Messaging
> clients.

For a web game it is a valid option. And from there, for any real-time
web app is still a valid option.

I really don't understand why xmpp bot implementors don't accept the
idea of using them for user interaction in web pages.

GAE XMPP fits the bill and its use on web apps should be encouraged,
not restricted to IM clients only.

Social games may help spread adoption of xmpp bots, think about it.
Reply all
Reply to author
Forward
0 new messages