Desktop and cloud system integration

1

I have a desktop system where I need to send some data to the Google Firebase service. I would like an idea of what would be the best way to send this data to Firebase , and it may happen sometimes that there is no internet connection.

A brief explanation of what will be integrated is as follows:
A customer registration where a customer happens to be registered or changed must be sent to Firebase .

So far what I could imagine was the following:

  • Create a table in the local "queue" DB where it will store the data to be sent;
  • If you have an internet connection, send the data from the queue to the Firebase;
  • Getting Firebase positive response the queue table is emptied, otherwise keep the data in the queue until there is a connection available;
  • asked by anonymous 02.07.2017 / 06:27

    1 answer

    0

    Good evening, I also think it's a good way out of this one, because even if you do not have an internet connection at the moment, I do not see any other way of sending the data instantly. I have some similar systems and APPs, though, do not use Google Firebase and MySql remote in an Amazon Cloud. In my case, an example of an Android APP, there is a synchronization to the database through a WebService that I developed and that makes the uploads and loads the information in the mobile in case of active connection keeping it always updated, however, in places where it has no internet connection it stores in a local "table" and sends it later, through an Android service that runs in the background, all transparently to the user. For me, it works well, I have already developed tax integration PDVs with a similar principle for the transmission of fiscal data.

    To create records in the database works perfectly for me like this.

    One caution you must have is to change the registry for two or more users at a time without it being updated on one or both PCs, if your system is multi-user . I've outlined this, in a way, by putting a field with the latest version of the registry edition in the database and if at the time of sending it to the server, the APP verifies that it is the same as the one loaded on the phone before the change and not to send a message to the user asking if he wants to subscribe or not. But that solved for me, it might not solve for you, it all depends on the need and functionality of the system you are creating.

        
    03.07.2017 / 04:52