Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Is it possible to make a plugin that allows use of Firebase? — Gideros Forum

Is it possible to make a plugin that allows use of Firebase?

phillphill Member
edited January 2014 in Plugins
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?

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited January 2014
    @phill are you sure the native SDKs (Android and Objective-C) are using sockets?
    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 ;)
  • Ah you seem to be right. I looked into it more and found a dev confirmed they only provide clients for JavaScript and REST. I'm in kind of an awkward situation as I can't effectively recreate the simulation of a connection. Do you think the best option is to create a new class and have instances that poll the server for changes?
  • @phill it all depends on your purpose
    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
  • @ar2rsawseen yea my purpose was to build a turn-based game. I'm gonna see if I can find a way to check for changes with REST and use that. Thanks.
Sign In or Register to comment.