Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: multi-device connection to remote MySQL


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Oct 17, 2016 2:28 PM Last Post By: Kim Madsen Threads: [ Previous | Next ]
Shanil M

Posts: 62
Registered: 12/24/04
multi-device connection to remote MySQL  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2016 1:14 AM
Hi

I am writing an app that must work on windows, android and iOS. It must make a (secure) connection to a MySQL database over the internet. I have Delphi Enterprise 10.1 and want to be able to use the existing components there, and not have to buy something like the devart DAC components.

I have been researching this and it seems that because there is no MySQL client for android or iOS that I am forced to use DataSnap. Is this the case? Is there any other way to make a remote MySQL connection without having to use DataSnap? I also do not want to do a client installation of MySQL, as this app must be able to install very easily and with a small footprint.

If DataSnap is the only solution - please let me know the easiest way to implement with a code example if possible. The MySQL database is on my ISP's server and they will mostly likely not allow a DataSnap server running as a windows exe, or even IIS or anything. They will just allow a direct connection to the database via a secure port.

(gripe: if indeed FireDAC does not support remote connections like devart DAC, then I am very disappointed with the price of Berlin)

thanks
Shanil
Kim Madsen

Posts: 362
Registered: 12/13/99
Re: multi-device connection to remote MySQL
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2016 4:26 AM   in response to: Shanil M in response to: Shanil M
Hi,

I would always recommend against any device connecting to any database
directly over the internet. Its better to have a layer between of
several reasons:

a) Security. Its much to exposed, regardless of chosen encryption etc.
The extra layer may (depending on how its implemented) provide you with
additional security, and protect your precious database.

b) Performance. Database engines are typically very chatty with their
clients. That means that they may take many internet transactions to get
your data over the wire. Using an extra layer will typically (again
depending on implementation) give you a much less chatty communication,
and thus better performance.

c) Deployment. Connecting to most major database engines requires
installing some kind of client API. An Oracle client installation file
is somewhere between 100MB and 200MB. Others may be significantly
smaller, but still much bigger than using a native intermediate layer.

So in your case an n-tier product like Datasnap is the right approach
for your project.

best regards
Kim Madsen
Components4Developers
The n-tier gurus.

Den 10/13/2016 kl. 10:14 skrev Shanil M:
Hi

I am writing an app that must work on windows, android and iOS. It must make a (secure) connection to a MySQL database over the internet. I have Delphi Enterprise 10.1 and want to be able to use the existing components there, and not have to buy something like the devart DAC components.

I have been researching this and it seems that because there is no MySQL client for android or iOS that I am forced to use DataSnap. Is this the case? Is there any other way to make a remote MySQL connection without having to use DataSnap? I also do not want to do a client installation of MySQL, as this app must be able to install very easily and with a small footprint.

If DataSnap is the only solution - please let me know the easiest way to implement with a code example if possible. The MySQL database is on my ISP's server and they will mostly likely not allow a DataSnap server running as a windows exe, or even IIS or anything. They will just allow a direct connection to the database via a secure port.

(gripe: if indeed FireDAC does not support remote connections like devart DAC, then I am very disappointed with the price of Berlin)

thanks
Shanil
Shanil M

Posts: 62
Registered: 12/24/04
Re: multi-device connection to remote MySQL  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2016 2:31 AM   in response to: Kim Madsen in response to: Kim Madsen
Hi Kim thanks for the insight - makes sense.
Will roll up my sleeves to work on a datasnap interface... guess it will be cheaper than buying weblogic ;)
The next problem is that my ISP might not have a windows server (or the appetite) to host client software and a datasnap application server - might have to upgrade hosting or move domain yet again...
thanks again
Shanil
Robert Triest

Posts: 687
Registered: 3/24/05
Re: multi-device connection to remote MySQL  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2016 4:16 AM   in response to: Shanil M in response to: Shanil M
The next problem is that my ISP might not have a windows server (or the appetite) to host client software and a datasnap application server
It will be interesting to see if and how we can use DataSnap when the Delphi Linux compiler is released...
Kim Madsen

Posts: 362
Registered: 12/13/99
Re: multi-device connection to remote MySQL  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2016 2:28 PM   in response to: Robert Triest in response to: Robert Triest
Den 10/17/2016 kl. 13:16 skrev Robert Triest:
The next problem is that my ISP might not have a windows server (or the appetite) to host client software and a datasnap application server
It will be interesting to see if and how we can use DataSnap when the Delphi Linux compiler is released...

I believe that it will work. I would guess that its the single most
important reason for Embarcadero would be spending energy on a Linux
(server side only) version of Delphi.

We will certainly support it with kbmMW the moment we will have compiler
on Linux.

best regards
Kim Madsen
Components4Developers
The n-tier gurus.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02