43
Views
7
Comments
Sample for realtime push notification from Server to Client on ODC PWA
Application Type
Mobile, Reactive

Hi everyone,

I'm coding the PWA on ODC, I need to implement realtime pushing from Server to Client. (Server send a message to client to refresh UI when there is a data change)
I tend to use Firebase Cloud Messaging, but i'm struggling with the ServiceWorker importing part.

Do we have any sample or tutorial for FCM on ODC PWA, thank you.

2018-06-04 08-06-09
Peter Van Den Ochtend

Do you already have a solution?
I use the Sample app, but I don't receive the notification InApp.

2025-12-04 09-01-03
Kiet Phan
Champion

Yes, we could implement notification with Javascript library from Firebase Cloud Messaging

2018-06-04 08-06-09
Peter Van Den Ochtend

I used the Realtime Database in the past. A normal notification through Cloud Messaging is slow (somewhere between 2 and 10 seconds).. How fast is this?

2025-12-04 09-01-03
Kiet Phan
Champion
2018-06-04 08-06-09
Peter Van Den Ochtend

Do you have a indication where to find that code that you implement?
Just to be clear. You then use the in app feature of the Firebase Cloud Messaging service or a different service like Realtime Databse (with a websocket listener)?

2025-12-04 09-01-03
Kiet Phan
Champion

oh, we just use FCM service by Firebase API v1, no other features like Realtime DB.

2025-12-04 09-01-03
Kiet Phan
Champion

Hi Peter, just to update, FCM sometime has significant delay can upto 10 seconds or even a minute. We decided to switch to Realtime Database. :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.