I have an AppEngine application which uses Google Accounts as authentication. What is the approach or idea on seeing if someone is online or using the application? And able to chat to online users.
Thanks.
The official way to implement chat on App Engine is using the Channel API. However, the quotas are strange, and it's fairly expensive at $0.01/100 connections.
I would recommend using a hosted web socket service like Pusher, or running your own nodejs server on another host.
You can use the XMPP API to get users status, and send them messages that appear in Google Chat.
https://developers.google.com/appengine/docs/python/xmpp/
Related
I are trying to read emails from an outlook mailbox using javamail api. The protocol for this mail reading is imap. Google SDK comes with java mail API but it doesn’t support imap protocol. For the purpose I need to include java mail api libraries in pom.xml. Now there are two copies of javamail api in app engine project, one that comes with google sdk and the other one from pom.xml. During execution of java code to connect to mailserver, app engine is not able make a connection sometimes. The behavior is not consistent as GAE might be loading java mail api in random order. When GAE doesn't connect to mailbox, i see the following error:
javax.mail.MessagingException: No login methods supported!
(com.sun.mail.iap.ProtocolException: No login methods supported!)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:477)
at javax.mail.Service.connect(Service.java:248)
at javax.mail.Service.connect(Service.java:91)
at com.disney.util.MailBoxConnector.connect(MailBoxConnector.java:48)
I could not find a workaround for this problem. Any suggestion will be greatly appreciated.
I searched a lot for built web service like Google Talk, using Google Application Engine and Python.
For that first step is to check the status of online user on the Gmail. I found many code of it on python using XMPP library but it work only on python not using Google Application Engine.
There is also suggestion of using XMPP python API but for sending message we have to provide JID like app-id#appspot.com and message send.We can not send message from one email Id to another Email Id directly.
Now I want to perform Oauth authentication in python for gtalk at domain level can anyone tell me how to do this?
I think you are confused. Python runs ON appengine. Also theres a working java xmpp example provided.
You can only send messages from your app. There are two options: your_app_id#appspot.com or anything#your_app_id.appspotchat.com.
If you wanted to behave like an arbitrary xmpp client, you'll have to use a third party xmpp library running over HTTP and handle the authentication with the user's XMPP server.
I have a Cloud App hosted on Windows Azure and I need to integrate XMPP with the service. Can I use GAE's XMPP API to achieve this? I'll need to be able to create new Jabber IDs and send & receive messages from other clients like GTalk.
As far as I know, GAE only supports Java, Python and my expertise is limited to .NET & C#; so, I'll have to make my Azure App to communicate with the GAE.
Finally, can I use GAE as an alternative to running ejabbered on Windows Azure Virtual Machines or Amazon EC2?
Thanks in advance... :)
You could but it would be very limited. You may be better off running ejabbered somewhere else.
With GAE's XMPP API, your username selection is rather limited. See the GAE XMPP Overview API documentation.
Your Cloud App would need to send and receive messages from your GAE app via HTTP accesses. This is no big deal for sending, but you'll have to work your own way of receiving messages. You could buffer your messages to the datstore and poll for messages. You could use the Channel API to receive messages directly, but so far the Channel API client is only available in Javascript, so your app would need some sort of javascript interpreter to use the client.
You will be able to send/receive messages from other XMPP addresses like GTalk clients.
I would like to create a web IM chat system using Google App Engine using XMPP possibly.
It would allow users of a social network to talk with each other.
Is this possible using GAE?
I haven't used GAE before. Does anybody know of any good examples/code which I could look into to get started?
If all your communication is between users who are interacting with your site directly, there's no need to use XMPP, or benefit from it - just write your IM system into the site directly. XMPP support is designed for interaction with external IM services.
Alternately, you could embed the Google Talk gadget in your site, but that will require users to sign in to their Google accounts to use it.
It's certainly possible. I would start with reading http://code.google.com/appengine/articles/using_xmpp.html in order to get started.
Is there a mechanism to receive emails and/or establish IMAP connections in Google App Engine? I know that GAE provides limited support for the JavaMail API (i.e. only allow to send emails). Any workaround?
For future readers of this post: the ability to receive email has been recently added to Google App Engine. Link to announcement
Not currently, but it is on the roadmap:
http://code.google.com/appengine/docs/roadmap.html
See http://www.smtp2web.com/ (made by a googler) for a temporary solution.
No, that is a limitation of the system (network calls are essentially limited to web requests).