Firebase realtime database RESTful API

Hi all,

Fuse is surprising me everytime and I feel blessful for the speedy progress too!

I am working with an application with Firebase backend. Using the cbaggers’ Fuse.Firebase (https://github.com/fuse-compound/Fuse.Firebase), the login is working fine. Now I am testing the realtime database.

Looking at the doc from Firebase (https://firebase.google.com/docs/reference/rest/database/#section-streaming), it made possible to detect ongoing data changes by setting text/event-stream header . May I ask is it possible to perform the RESTful streaming in Fuse?

Thanks,

Michael

Hi micx,

thanks for the kind words!

If you’re already using Fuse.Firebase, I suggest you start by looking at the various Fuse.Firebase forks - at least one of them has started work on Storage, so maybe that gives you a head start.

As for RESTful streaming, the short answer would be “yes”. There is WebSocket support in Fuse already: Supported Fuse polyfills. Consequently, there is an underlying socket mechanism in Uno that I think might be reused for what you’re after.

I might have gotten it completely wrong with my “sockets-will-do-the-trick-assumption” and I will ask around for other people to jump in with their suggestions.

Hi micx,

Fuse.Firebase has focused so far on wrapping the native apis so we dont have any of the REST support in there. We also don’t have support for Server-Sent Events which seems to be a requirement for the REST database streaming feature.

Bolav has a fork where they are working on Database support, but I’m not sure of it’s current state. He’s easy to find in the Fuse community slack though.

Thanks all for the replies! I will try sticking to the native approaches. It’s fun working on the project.

Michael