Sockets or Apple Push Notification support in Google App Engine

1,283 views
Skip to first unread message

Giant Fighting Robot

unread,
Feb 13, 2012, 2:42:43 PM2/13/12
to google-a...@googlegroups.com
I have outgrown the 3rd party options for push notifications to Apple devices.  I heard rumors that Google was planning to add socket support to the app engine which would enable me to roll my own push notifications.  I'm starting to think that was Channels, which doesn't appear to do what I need.  My questions are:

1) To double check, does the App Engine allow for apple push notifications without going through a 3rd party service?  (maybe it was added in and I missed it?)

2) Assuming no, are there any plans to support it in the near future?  I don't need a date, but if it's expected in the coming months I might grin and bear it until support comes, or if it's completely orthogonal to GAE's plans, I'd love to hear that so I can plan accordingly.


Robert Kluin

unread,
Feb 14, 2012, 2:35:53 AM2/14/12
to google-a...@googlegroups.com
Do you have a premier support account? If so you might want to ask
your dev advocate about this.


Robert

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/oPlc4_gMmAMJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

Johan Euphrosine

unread,
Feb 14, 2012, 7:18:53 AM2/14/12
to google-a...@googlegroups.com
You may want to star the following issue:
http://code.google.com/p/googleappengine/issues/detail?id=1164

Hope that helps.

--
Johan Euphrosine (proppy)
Developer Programs Engineer
Google Developer Relations

Giant Fighting Robot

unread,
Feb 20, 2012, 2:48:31 PM2/20/12
to google-a...@googlegroups.com
Thanks for the responses - I did find that issue, but of course no news other than a lot of people requesting it.

I don't think we have a premier support account, but I'll double check with my boss.

For now our plan is to move our services (at least some of them) to another provider, sadly :'(

Jeff Schnitzer

unread,
Feb 20, 2012, 4:05:45 PM2/20/12
to google-a...@googlegroups.com
I don't work for Google, but I have a GAE app that sends millions of push notifications out through a few hundred lines of java running on an $11/mo rackspace VPS.  You have all the tools available to you, you don't need Google.

Think about this for a moment.  Let's say Google gave you access to socket APIs.  You still have to write a process that runs on a backend that sends push notifications through a persistent socket connection to apple.  It is just as easy to write something that runs on a VPS as it is to write it as a backend task.  With the remote API you have the exact same platform calls available.

This is a non-issue.

Jeff

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/G1ke7Rx0i1AJ.

GR

unread,
Apr 17, 2013, 4:41:31 PM4/17/13
to google-a...@googlegroups.com
Here's a sample project that can use sockets on App Engine to send out push notifications on ios:

Kaan Soral

unread,
Apr 17, 2013, 6:07:38 PM4/17/13
to google-a...@googlegroups.com
Well, thanks a lot for sharing this.

If I don't recall incorrectly, apple's apns was accepting multiple push notification's at a time, and they were encouraging those push's to be sent in batches, I also remember reading that, if you push many items one by one, the calls were blocked.
Anyone experienced in this area?

I was thinking of building a simple pipeline system to build a custom push solution, but didn't do much research yet, recently implemented Parse's solution for apns. Appengine's socket introduction was surprising :)

Kaan Soral

unread,
Nov 23, 2013, 2:49:11 AM11/23/13
to google-a...@googlegroups.com
Here is the project that GR shared: https://github.com/GarettRogers/appengine-apns-gcm
Here is an issue related to this: http://code.google.com/p/googleappengine/issues/detail?can=2&start=0&num=100&q=socket&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log&groupby=&sort=&id=9246

After solving wrap_socket problems, I've stumbled upon wrap_socket file_name argument issues, basically you have to pass file names as certificate/key arguments, not possible3 on appengine
The modified apns.py in this project uses StringIO.StringIO wrapped arguments, however it doesn't seem to be possible with the current wrap_socket implementation, I'm not sure whether the auther used a patched/special wrap_socket

Is there anyone who made this work on the SDK?

Kaan Soral

unread,
Nov 23, 2013, 3:15:56 AM11/23/13
to google-a...@googlegroups.com
I've discovered this: https://developers.google.com/appengine/docs/python/sockets/ssl_support
But it doesn't seem to be implemented for the SDK, If I'm not mistaken?

Kaan Soral

unread,
Nov 23, 2013, 3:41:24 AM11/23/13
to google-a...@googlegroups.com
Here is a possible solution:
def _connect(self):
        # Establish an SSL connection
        self._socket = socket(AF_INET, SOCK_STREAM)
        self._socket.connect((self.server, self.port))
        if os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'): keyfile="C:\devappserver2/k.txt"; certfile="C:\devappserver2/c.txt"
        else: keyfile=StringIO.StringIO(self.key_file); certfile=StringIO.StringIO(self.cert_file)
        self._ssl = ssl.wrap_socket(self._socket, server_side=False, keyfile=keyfile, certfile=certfile)
Reply all
Reply to author
Forward
0 new messages