Synchronizing the Database on Desktop and Mobile?

0
Well I'm going to start working on a BIG project, which will be MULTIPLATAFORM, both for Desktop and Mobile, and we're discussing a way, of working with the DATABASE in both applications. The interactions would be more or less like FACEBOOK.

  • Every UPDATE in the BD via Desktop, must be notified in the Mobile & Tablet. Like when a FACE friend shares something and you're notified.
  • A chat that is always synchronized on both platforms.
  • Would you like to know how to do this? We were discussing building our application in PHP and PostgreSQL, what do you guys think? Already enjoying, where do you recommend hosting this application? I was thinking about Digital Ocean? Remembering the Desktop application I mean a SITE.

        
    asked by anonymous 27.05.2015 / 23:48

    1 answer

    1

    You should do the following:

    Save everything to the postgres database and access the information via JSON on the mobile device. So when you did an update on the bank, you would notify via JSON itself by issuing a notification.

    For chat, you always use the get and POST methods to receive and send the data.

    But if you want the user to view the information offline, you should create a sqlite database on the mobile and save the information to it.

    About Digital Ocean, I have a server with them and I totally recommend it.

        
    17.11.2015 / 19:45