Book Image

Python for Google App Engine

By : Massimiliano Pippi
Book Image

Python for Google App Engine

By: Massimiliano Pippi

Overview of this book

Table of Contents (15 chapters)
Python for Google App Engine
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding how the Channel API works


The Channel API basically consists of the following elements:

  • Channel: This is a one-way communication path between the server and a JavaScript client. There is exactly one channel for each client and the server uses it to dispatch messages.

  • Client ID: This is a string that identifies individual JavaScript clients on the server. We can specify any string as the Client ID, for example, the identifier of the current user.

  • JavaScript client: The client is responsible for connecting to a specific channel, listening to updates on the channel itself, and sending messages to the server via HTTP requests.

  • Server: The server is responsible for creating channels for each JavaScript client connected, providing access tokens to authenticate connections, receiving messages from the client via HTTP requests, and sending updates through the channels.

The first step for using the Channel API is delivering the JavaScript client to our users and building the code into the...