111
Views
6
Comments
Solved
[Firebase] How to trigger firebase event from server side (Create/Update entity action)
firebase
Reactive icon
Forge asset by Labs
Application Type
Reactive

In the past (older version) it was possible to use a Firebase server action to trigger firebase.

Since the switch to Firebase Javascript SDK 8 it's only possible in a browser (where javascript is processed).

My usecase: When we receive information from external service. We update our entities and want to trigger all the clients that a currently subscribed on that channel. How is this now possible?

2018-10-18 08-34-00
Eric Bulters
 
MVP
Solution

Hi Peter,

I used https://www.outsystems.com/forge/component-overview/2121/firebase-web in one of my timers and it seems to work like a charm.

Kind regards,
Eric

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

Hi Eric,

Thanks for replying.

Just to be sure. You use the action called "FirebaseNotifyEventREST" for this?

I am putting it in my test project to check it out!

2018-10-18 08-34-00
Eric Bulters
 
MVP

Yes FirebaseNotifyEventAPI indeed.
Let me know if it works for you! :)

2018-10-18 08-34-00
Eric Bulters
 
MVP
2023-11-14 07-36-16
Yung Shin

Hello,

Apologize for bumping an old thread, I came across this thread and tried to implement the same, but in my case, I noticed there was a delay on the receiver every time I refreshed the page. I have to wait for 1~2 minutes before the eventNotify kicks in and is working fine afterward until I navigate to another page and the block reloaded. I had debugged and RWA Firebase webblock and did not notice any issue during the initialisation. 

For example:

When I have two browsers logged in, BrowserA logged in for 5 minutes, BrowserB just refreshed the page. When I trigger the event from BrowserA, only BrowserA is able to receive the notification. When I trigger the event from BrowserB (just refreshed), BrowserA will still be able to receive the notification but not BrowserB. 

Attached is my OML. I'm using RWA's webblock and NotifyEventAPI from FirebaseWeb. 

 Any idea/feedback is very much welcomed and have a nice day ahead.

Kenny

firebase-clientserver.oml
2023-11-14 07-36-16
Yung Shin

Please ignore the issue above as the issue is probably due to connectivity issue from our end. 

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