ROR Push Notification Engine

Recently, I was assigned the task of developing a notification mechanism. For notifications, we will use Push Notification. I am looking for the best solution for the engine, because in the future we will also need to scale the application to other devices. Below are some project details.

Backend: Application backend developed in Ruby on Rails as webservices

Devices that will have push notification iPhone, Android, Pebble (smart watches), web application

Current solution: We are currently thinking of creating a database lookup table for notifications. The working class in Rails will start in 1 minute, and it will push out all the notifications to the devices stored in the database. From the webservice methods, we insert the data into the notification table.

We do not want to use services such as UrbanShip to push notifications. We are going to implement them only with Ruby Gems. Currently, we have made a small demo version based on the GCM gem for android push notifications.

Questions: Is my approach to the right solution? or is there a better solution to this kind of problem.

EDIT:

I think my previous description of the problem was a bit confusing.

GEMS Ruby push-. Forexample iOS Grocer Android GCM.

. , , GEMS ( ) . , , -, .

, , , . Register.

public void Register()
{
   //Registration logic

   //Add a notification in the notification table
}

, , . ROR ? ?

+4
3

Push- Ruby. - RPush https://github.com/rpush/rpush. RPush ( ), . , . RPush Pebble Web App, .

, , :

  • APNS. Apple , , .

  • Apple - Apple , , . , .

  • .

Ruby push- PushSharp (#) Node -Apn ( NodeJS, iOS)

, , , . . push- , , . , UrbanAirship, Parse OneSignal (My service) - .

:

- Cron, . Ruby on Rails.

RoR , . daemon cron .

RPush, , . Gem Rails, , , , , .

+11

, push- Rails.

:

- , Apple Google , " " ( ).

+1

Source: https://habr.com/ru/post/1540412/


All Articles