Is it to possible create a simple chat facility using XMPP with Google App Engine? - google-app-engine

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.

Related

Google Cloud Datastore from embedded device in POSIX c?

I managed to get Google Cloud Messaging working on an embedded device using libcurl using http requests and a 'BrowserKey' for authentication.
Now i would like to move to Google Cloud Datastore for saving settings of the embedded device into the cloud. There seems to be support for Java, Ruby, Python, NodeJS but so far I found nothing that could help me further using things i know.
Can I get access to the Cloud Datastore from my existing application written in plain C ?
While we don't have client libraries for C, we do have a RESTful API (documentation) that you can call, so it should be possible to write your own simple library in C to talk to Cloud Datastore from an embedded device.
If you are concerned about security (since someone could possibly impersonate your embedded device and get direct access to your Cloud Datastore instance, I recommend you take a look at Cloud Endpoints (documentation). It gives you an easy way to generate a RESTful API on top of App Engine. You could then use your custom API in the embedded device and use App Engine as a proxy/data validation layer that controls access to the database.

What are the advantages of using Google Cloud Endpoints, explained in non-technical terms with examples?

I have previously used
#app.route('/mypage/<int:myvariable>/')
to create rules for what should happen when users land on different urls on my website. I have done this on local machines that have been running on my own virtual servers.
Now I am learning to publish my first web app to Google App Engine. I have heard that I should be using Google Cloud Endpoints instead of the route decorator.
#endpoints...
I've read a few articles about endpoints and some of the benefits of endpoints that they list are:
Endpoints makes it easier to create a web backend for web clients and mobile clients
Endpoints free you from having to write wrappers to handle communication with App Engine
Even if I have read this I can't wrap my head around what this means. I don't understand it. Can you explain in non-technical terms with examples what the advantages of using #endpoints is compared to alternatives? The alternative that I am familiar with is #app.route.
Google Cloud Endpoints can be thought of as a subset of #app.route. They are intended to solve the API backend problem for mobile and javascript clients. They are not intended to serve web pages and other hypermedia. You can use the normal routing methods of your framework of choice to create a web service for your application but Google Cloud Endpoints takes care of a lot of boilerplate for you.
There are a lot of limitations with Google Cloud Endpointsso be sure to familiarize yourself with them before committing. For one, you cannot host Google Cloud Endpoints on a custom domain name. They are only accessible via <app_id>.appspot.com/_ah/api/*
Endpoints makes it easier to create a web backend for web clients and
mobile clients
What this means is that you can create one backend and then iOS, Android and Web-apps (via Javascript for example), can execute your API methods with specific client generated libraries.
This is convenient if you are building a backend that you want to be easily accessed via smartphones or through a web browser.
Endpoints free you from having to write wrappers to handle
communication with App Engine
With Endpoints you can generate client libraries (e.g. Android, iOS, Javascript) that you can then execute your API methods. You don't have to worry about writing a bunch of additional code to do that.
My Opinion:
I have never used Cloud Endpoints to make a web-app but it is very convenient if you are making a mobile app for iOS and Android because you can access your backend with both platforms.
One reason you might want to use Cloud Endpoints for a web-app instead of something else is because of Datastore. Datastore is the way Cloud Endpoints stores data. It is a NoSQL storage method which is kinda tricky to wrap your head around at first if you come from a relational database background, but once you get it, it makes a lot of sense.

Online and Chat in AppEngine Application

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/

If I create a succesful dot com company utilizing google app engine/datastore will google own it?

Or is it easier to host my own website and database.
The main reason I would use google app engine is the "free" hosting and scalability;
Has anyone got experience using app engine, was it a good experience ?
The answer is no, Google does not own either your code or your data. Both of them are completely yours. Google only provides hosting for it - they have no more claim on your data and IP than Amazon does if you go with EC2. Take a look at section 6.3 of the terms.
I'm running mapfaire.com on the App Engine and I'm having a very good experience. I intend to continue using it for all my applications.

Email Support in Google App Engine

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).

Resources