Push Notifications and DataSnap

  

I was recently in a situation where I had access to only port 80.
This means that RDP (port 3389) doesn’t work… Amazon EC2 APNS demo was out.
Even local APNS was out, because it uses port 2195 from the sending server…
So, I decided to retrofit my APNS server and make it a DataSnap server responding to port 80 in addition to being a client I can click a button on using RDN to Amazon EC2.
I created a server method SendPushNotification. It takes the DeviceToken and the text message as parameters.
I call it from any browser anywhere on the following URL scheme:
http://MyEC2Instance/datasnap/rest/TServerMethods1/SendPushNotification/DeviceToken/Message
And it works! So next time I’m locked down to port 80 my demos will work just fine…

Sometimes I’m easily amused!
Share This | Email this page to a friend

Comments are closed.