locked
Using cloud database and push notifications/updates RRS feed

  • Question

  • User176749 posted

    I would like to use remote notifications over the cloud. Azure looks like good option for it. is there any free or cheap option?
    Secondly when I want to use a remote DB snycronized with the local SQLite, what is the best way? a webservice or api in between or is there a direct way? Azure has mobile apps option but not sure how it work.

    Friday, February 26, 2016 3:23 PM

Answers

  • User76916 posted

    @batmaci - The only free option would be to directly connect to each push notifications service, e.g. GCM, APNS and WNS/MPNS. However I personally went with the Azure option. Its just so much easier.

    Azure does have an option for Syncing - https://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-store-dotnet-get-started-offline-data/

    I tried this over a year ago, the complexity became too much when I tried to do anything out of the sample applications and I ended up rolling my own. I haven't tried their Version 2.0 + though, they may have made things much better in that release.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Saturday, February 27, 2016 1:24 AM
  • User76916 posted

    @batmaci - Entity Framework is just on the server side. EF for UWP works but not for Android and iOS hence its not really a Xamarin Forms solution, you need to use SQLite for the mobile DB and I use MS SQL server for the server DB.

    I created my own REST based API. It takes more work and there are certainly more things to consider. If you have a simple table structure Azure Client Sync may be a good option, it does take care of a lot of versioning issues. But don't take syncing lightly, its a lot of effort all up, its the edge cases that get you.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 3, 2016 12:38 AM

All replies

  • User76916 posted

    @batmaci - The only free option would be to directly connect to each push notifications service, e.g. GCM, APNS and WNS/MPNS. However I personally went with the Azure option. Its just so much easier.

    Azure does have an option for Syncing - https://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-store-dotnet-get-started-offline-data/

    I tried this over a year ago, the complexity became too much when I tried to do anything out of the sample applications and I ended up rolling my own. I haven't tried their Version 2.0 + though, they may have made things much better in that release.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Saturday, February 27, 2016 1:24 AM
  • User176749 posted

    @AdamP I went through the official articles and samples, as I understand that you create a sqlite db on the cloud and it automatically creates a local copy of the db. in this case, I guess that I dont need any sqlite to be created and no sqlite related package from nuget is needed. Do I understand it correct? What if I have already an existing sqlite db with data? Can I upload it to Azure?

    Sunday, February 28, 2016 11:29 PM
  • User76916 posted

    @batmaci - the Azure Mobile Client Offline/Sync requires a local SQLite DB, never tried using an existing one before.

    If you want to upload an existing SQLite DB, you will need to add certain fields to the local SQLite tables. My memory on this is a little fuzzy, something like Version, CreatedAt, Deleted I think. These are the columns used for sync. These tables need to be identical on the Azure side as well, unless you want to get into some complicated mapping.

    Monday, February 29, 2016 12:00 AM
  • User176749 posted

    It looks like that it uses Entity Framework which is big advantage for lazy and eagerly loading. Do you know if they are supported? I didnt like the performance of using sqlite-net-extensions especially for n to m related tables.

    I ended up rolling my own.

    Did you simply upload another sqlite db on cloud and synchronized between your local one using wcf or api? thats what I am considering but I am not sure how the performance will be and if its worth to afford so much(even though azure requires a lot of afford as it seems)

    Monday, February 29, 2016 2:28 PM
  • User76916 posted

    @batmaci - Entity Framework is just on the server side. EF for UWP works but not for Android and iOS hence its not really a Xamarin Forms solution, you need to use SQLite for the mobile DB and I use MS SQL server for the server DB.

    I created my own REST based API. It takes more work and there are certainly more things to consider. If you have a simple table structure Azure Client Sync may be a good option, it does take care of a lot of versioning issues. But don't take syncing lightly, its a lot of effort all up, its the edge cases that get you.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 3, 2016 12:38 AM