I am creating a recipe app on Android. This will have various features including a search box which the users enters in a keyword and it will display a matching recipe from a database. I plan on having thousands of recipes from around the world.
So far, from my research, I've learned that it's possible to have a Web Service between the MySQL database and the android application and have the communication via the WS. At first I was going to deploy this on my host computer but I ran into an issue.
I saw this question on StackOverflow and it's worrying me a little
Can I run mySQL when my computer is off?
If I do go for a localhost database, it will be running off my computer. My app would not be able to access the database when my computer is switched off, so I'd end up having to run it 24/7 which I am not prepared to do.
Alternatively, I have a Virtual Machine (from a hosting company), which I access using RDP, this uses Windows 2012 Server R2. This is probably the best option as it's very powerful and my server will continue to run as long as the network doesn't go down.
The problem is, because it's a Virtual Machine running on VMWare, it doesn't support virtualization so I can't run my Android emulator on there (i have tried). See below:
Not Inside a VM - You cannot run a VM-accelerated emulator inside another virtual machine, such as a VirtualBox or VMWare-hosted virtual machine. You must run the emulator directly on your system hardware.
Recently, I planned on using my host computer to communicate with the MySQL database located on the VM (through the webservice on the VM). But they are not on the same network, so how can I do this?
What other feasible method can I use to set up everything? Please correct me if I misunderstood anything about how localhost or VMs work. I'm new to Android apps and networks so it's quite confusing to me.