Skip to content
/ jraze Public

High reliability(ensures message sending task) installable "Large volume push" send service using APNs, FCM like 'Braze'

License

Notifications You must be signed in to change notification settings

pjongy/jraze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation




Installable push sending service which can control push targets
with their properties by notification's conditions.


API specification

API specification document

Quick start (on local)

Pre-requisites

  • docker >= 19.03.8
  • docker-compose >= 1.25.5
  • python >= 3.7
------- Select FCM API version
| $ export PUSH_WORKER__FCM__LEGACY__SERVER_KEY={..fcm server key..}
| $ export PUSH_WORKER__FCM__CLIENT=legacy
-------
| $ export PUSH_WORKER__FCM__V1__KEY_FILE_NAME={..fcm service account key path..}
| $ export PUSH_WORKER__FCM__V1__PROJECT_ID={..fcm project id..}
| $ export PUSH_WORKER__FCM__CLIENT=v1
-------
------- Select APNs authorization method
| $ export PUSH_WORKER__APNS__P8_CERT__FILE_NAME={..apple apns p8 file path..}
| $ export PUSH_WORKER__APNS__P8_CERT__KEY_ID={..apple apns key_id..}
| $ export PUSH_WORKER__APNS__P8_CERT__TEAM_ID={..apple team_id..}
| $ export PUSH_WORKER__APNS__P8_CERT__TOPIC={..apple product bundle id..}
| $ export PUSH_WORKER__APNS__CERT_TYPE=p8
-------
| $ export PUSH_WORKER__APNS__PEM_CERT__FILE_NAME={..apple apns pem file path..}
| $ export PUSH_WORKER__APNS__CERT_TYPE=pem
-------
$ docker-compose -f local-docker-compose.yml up -d

Project structure

/
  /apiserver
  /worker
    /messaging
      /apns
      /fcm
    /notification
  • API server

    • Endpoint for client can attach through REST API
    • Take roles about register device/notification
    • Also it shows device's event for notification
    • Publish job for 'Notification worker'
  • Notification worker

    • Find devices comfort notification's condition and publish job for 'Push worker'
    • Client for update notifications' sent result
  • Messaging worker

    • Client for send push message to each send platform like: FCM, APNs
    • Publish job back for 'Notification worker' to update notification sent result (success / failed)

Sequence

      _________________________
     v          _____          |                       _____
[API server] --(____()----> [Notification worker] ----(____()--->  [Messaging(APNS) worker] ---+
                            ^                      +--(____()--->  [Messaging(FCM) worker] ----+
                            |                  ______                                          |
                            +-----------------(_____()-----------------------------------------+

Scale out-able instance

  • APIServer
  • NotificationWorker
  • MessagingWorker(FCM/APNS)

Trouble shooting

FCM

  • FCM worker can't send notification with 403

    {"code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED"}}

    You should set permission "cloudmessaging.messages.create"

APNs

  • Extract PEM file from *.p12
    openssl pkcs12 -in {P12 FILE} -out {EXPORTED PEM FILE} -nodes -clcerts
    

About

High reliability(ensures message sending task) installable "Large volume push" send service using APNs, FCM like 'Braze'

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published