locked
General Confusion about Mobile Services RRS feed

  • Question

  • Hello all,

    I'm a little bit confused about how Mobile Services in Azure work, and about the best way to set up my project. I'm building a mobile app with PhoneGap (Cordova), and I'm going to write the backend in Node.js and run it in Azure. The backend will use Node, MongoDB, and Redis, and will need to handle plenty of computation. The backend won't serve any webpages, but it will need to communicate frequently with the client.


    Because of the service's integration with PhoneGap, as well as the frequent communication between client and server, I thought that a Mobile Service would be an excellent fit for my app. However, as a beginner with Azure, I'm unsure how a Mobile Service would handle the computational aspects of the project. For instance, how would Redis be set up, and what type of environment would the service be run in (for instance, how much RAM would Redis have at its disposal)?

    I have considered that a VM might be a better fit for the project, but I don’t understand the differences between Azure Services and Azure VMs well enough to grasp how development would be on each of them. Would I save money by going with one as opposed to the other? It appears to me that app logic can run as a service; am I misunderstanding how services work?

     


    Thursday, January 8, 2015 2:39 AM

Answers

  • The best option is to use the new Redis Cache service, that you can just connect to from your Node.js backend: http://azure.microsoft.com/en-us/services/cache/

    However, the MongoDB part will be harder. The JavaScript backend of Mobile Services only has built-in support for Azure SQL Database. Obviously you can connect to other databases, but then you have to do the work of the tables API yourself.

    A VM is probably not necessary here, since you are consuming some other high-level services. If it turns out that Mobile Services isn't the best fit, I would consider using Azure Websites. You won't get the benefit of our SDK (unless you replicate our table protocol), but there is very good support for Node on Azure Websites. And, despite the service name, you don't actually have to host a website--Websites is really a general platform-as-a-service, with a lot of nice features such as source control and staging.

    • Proposed as answer by Donna Malayeri (MSFT) Tuesday, January 13, 2015 12:39 AM
    • Marked as answer by Reubend Saturday, January 17, 2015 5:11 AM
    Tuesday, January 13, 2015 12:39 AM

All replies