Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Python for Google App Engine
  • Toc
  • feedback
Python for Google App Engine

Python for Google App Engine

By : Pippi
4.1 (10)
close
Python for Google App Engine

Python for Google App Engine

4.1 (10)
By: Pippi

Overview of this book

If you are a Python developer, whether you have experience in web applications development or not, and want to rapidly deploy a scalable backend service or a modern web application on Google App Engine, then this book is for you.
Table of Contents (10 chapters)
close
9
Index

Tracking connections and disconnections

An App Engine application is responsible for the creation of channels and the transmission of the token, but it doesn't know whether the JavaScript client is connected or not. For example, our Notes application sends a message upon the creation of a new note through the inbound e-mail service, but on the other side, the JavaScript client might or might not receive it. In some contexts, this is not an issue, but there are several use cases where an App Engine application needs to know when a client connects or disconnects from a channel.

To enable channel notifications, we first need to enable inbound Channel presence service. To do this, we have to change our app.yaml configuration file by adding the following code:

inbound_services:
- mail
- channel_presence

Now that the presence service is enabled, our Notes application will receive HTTP POST requests to the following URLs:

  • The /_ah/channel/connected/ URL: When a JavaScript client has connected...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete