2

I'm building an application which has the following requirements:

When a mobile application running in the client's smartphone makes a call to a web service (running on a Ruby on Rails 4.1.5 application deployed on Heroku), I need to push the data sent by the client to an specific device (iPad). I don't want the iPad app to be polling the server, so I think that maybe I need to use something like WebSockets.

To illustrate this:

Architecture

I have read this article: Adding Real-Time To A RESTful Rails App. However, it uses Node.JS and Redis, and I don't know how that could work on Heroku.

Any idea would be very appreciated!

olistic
  • 125
  • 4
  • 8
  • 1
    I usually use gem 'pushmeup' (https://github.com/NicosKaralis/pushmeup) and you need to generate .pem file from your Apple Developer Account (if you don't know how, read this http://stackoverflow.com/questions/21250510/generate-pem-file-used-to-setup-apple-push-notification) Remember that you should get the device unique id to be able to send push notification to that device (iPad/iPhone) & the size limit sent in the push notification is 256 bytes (read this https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html) – Romans 8.38-39 Sep 23 '14 at 16:48
  • What kind of data do you want to be sent to the device? Using WebSockets makes sense only if you need persistent connection between server and device. If you need to say something to the client use push notifications. – Alex Sep 23 '14 at 16:49
  • I have read that push notifications are used when you need to send something to the app when it is not running. In my case, I need to send data when the app is running. Particularly, I want to send the information of the client (who is using the mobile app). – olistic Sep 23 '14 at 18:12

0 Answers0