I am developing an application that doesn't reside on AppEngine and having the functionality of a chat putting in communication web clients (browser + javascript) and mobile clients (ActionScript). I'm thinking of using the XMPP protocol on AppEngine (then use only the servers for the chat feature on Google and still leave the rest on my server). You tell me if this is possible? What are the differences with the Channel API? Thanks
XMPP and the Channel API solve problems at two different levels of the stack.
XMPP describes a generic way to get a message from one endpoint to another. There are existing XMPP clients for Windows, Linux, OSX, etc. and there are existing XMPP client libraries written C++, Python, javascript, etc. If you just want to deliver text to a user who you know already has an XMPP client, using the XMPP App Engine API is the obvious solution; if you want to have tons of control over the client experience and have time to spend on it, using an existing XMPP library and making a custom client could be a good choice.
The Channel API describes a server-side method for sending messages and client-side method for receiving messages. The App Engine implementation provides a javascript client, which is the tricky part for a web app because it requires a persistent HTTP connection. You could certainly re-implement the Channel API on another platform using whatever means you'd like (for App Engine we use the Google Talk stack; XMPP on the backend with JSON over a long-poll HTTP connection on the frontend).
The fundamental question is just how much abstraction you need for your implementation. The Channel API abstracts away much more than the XMPP API, and provides a client library to make connection over javascript easy.
As far as I understand ChannelAPI is a backbone behind Google XMPP service. If you want to asynchronously send/receive (server push) row JSON objects between client's JavaScript and your Webapp hosted on GAE, then ChannelAPI is the way to go.
Channel API uses something called XPC to communicate to Google's GTalk client via an IFrame. This client facilitates bi-directional communication between the browser and your App. The JavaScript library that's provided for you, is loosely mapped to the current WebSocket's API and should ease transitioning from Channel API to WebSockets, once/if it's supported on AppEngine.
I believe that XMPP is the backbone for the Channel API and is a superset of features. For example, the XMPP API has support for Invitations
So, yes you can use the Channel API(browser) and XMPP(everywhere) to build chat features.
The XMPP API facilitates communication between your app and an XMPP client, like Google Talk.
The Channel API is used to push data from your app to a web browser using web sockets.
Either can be used as part of a chat app; the choice just depends on whether chat clients are going to be using an XMPP client or a web browser.
© 2022 - 2024 — McMap. All rights reserved.