I recently fell in love with Firebase and want to use it in my Gideros project. I did some research and found the Firebase REST API for Gideros, but I want to be able to have socket support, not simple REST calls. My immediate thought was to create a plugin that would allow me to access the android and iOS Firebase libraries. I've been looking at the (2) tutorials on creating plugins for Android which has brought me nothing but pain and failure.
Before I embark on this journey, I need to ask if it's actually possible. I'll be receiving LUA calls to invoke Java stuff, and the using Java to call LUA functions when Firebase has an event. Seems simple enough.
Now the big problem: there are no tutorials on this. I've found two, but both end up in a lot of errors. Can I get a little help?
From the look at the docs, they might as well use REST api through HTTP internally.
As there is not connect, disconnect, read, etc methods, only, authenticate and query or do transaction. So my guess would be they all work through REST.
But if I'm mistaken and there is a socket connections available, your best bet would be to implement socket protocol in Gideros using Lua sockets, rather than creating separate plugin for each system (Android, IOS, etc).
But to answer your question, yes you would be able to create Firebase plugin in Gideros if you want to
if you simply want to save the state of your app, then you need to only sync once in the begining, and then only save when there are changes to save.
But if you want to have some kind of multiplayer, not real time, but for example turn based, then there probably would be a time interval in which you would poll the server for changes