javaazurewebserverbasic4android

Remote Database Connector (RDC) on Azure


With Basic4Android I can get access to a SQL server database using Remote Database Connector (RDC) (see http://www.b4x.com/android/forum/threads/remote-database-connector-rdc-connect-to-any-remote-db.31540/ ). I can put the SQL server database on Azure. But how can I put the Java web server on Azure ?


Solution

  • Per my experience, I suggest you to create a Windows VM on Azure and install Java Environment to deploy the RDC on it. Please refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial-classic-portal/ and https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-log-on-windows-server/.

    Why is Azure VM? Why is Windows?

    The causes are as following:

    1. The RDC is a lightweight Java web server based on Jetty, and the Jetty version is 7.4.2. However, the version of Jetty on Azure Webapps from gallery is 9.1.2. They have the incompatible component of different implementation, such as Websocket.
    2. The Jetty Server of RDC is running as a standalone application, not a Java servlet container. So RDC can not be deployed on Azure Webapps.
    3. The RDC http listen port is 17178. It can be configured in config.properties. But if RDC as a CloudService run on Azure, you need to configure some properties for Cloud Service Role such as public ip & port.
    4. If you want to deploy it on Azure Linux VM, you need to run command chmod u+x for the decompressed files in RDC.zip and create a RunRLC.sh for boot Main class 'RemoteServer'.

    Note: I recommend Microsoft SQL JDBC version 4.0+ Driver to access Azure SQLDatabase and SQL Server on Azure. The RDC's default JDBC for MSSQL is jTDS that it is incompatible with MSSQL on Azure.

    Best Regards.