Hi All,
I am creating a pair of applications that essentially transfer data from a remote client to a local server. The trick is that "remote" in this application means "way out in the mountains where it takes an hour by four wheel drive to reach the nearest paved road and don't even talk to me about a cell tower for another hour or so of driving".
Because of this, we are using shoe-leather-net to communicate between the client and the server. The client is collecting data into a MySQL table. Every so often, a person will use the client application to copy the data onto a thumb drive and carry it down the mountain to the server, where the partner application will copy the data into an identical MySQL table. These are distinctly non-technical people I am talking about here - typing a file name is a high-skill activity - so this needs to be a dead-simple user interface.
The data is sensitive, so it is encrypted going on to the thumb drive and decrypted coming off.
Here is the question: The copy process that I have programmed is very slow - on average 2 seconds per row - on both ends of the transaction and this does not seem right. What can I do to improve it?
When the process is running, Task Manager shows that mysqld-nt is using as much of the CPU as it can get and the actual application is only using CPU time once in a while.
The basic client task is this:
-- Read a row from the local table
-- Encrypt the row
-- Write the encrypted row to the file
-- Repeat until all of the unexported data has been copied
The basic server task is the inverse:
-- Read a line from the file
-- Decrypt the line and construct a corresponding INSERT statement
-- Execute the INSERT
-- Repeat until end-of-file
Other possibly pertinent information:
-- Windows XP Pro
-- Visual Basic.Net
-- MySQL 4.1.14-nt
-- MyODBC 3.51.13
Dave Gee
I am creating a pair of applications that essentially transfer data from a remote client to a local server. The trick is that "remote" in this application means "way out in the mountains where it takes an hour by four wheel drive to reach the nearest paved road and don't even talk to me about a cell tower for another hour or so of driving".
Because of this, we are using shoe-leather-net to communicate between the client and the server. The client is collecting data into a MySQL table. Every so often, a person will use the client application to copy the data onto a thumb drive and carry it down the mountain to the server, where the partner application will copy the data into an identical MySQL table. These are distinctly non-technical people I am talking about here - typing a file name is a high-skill activity - so this needs to be a dead-simple user interface.
The data is sensitive, so it is encrypted going on to the thumb drive and decrypted coming off.
Here is the question: The copy process that I have programmed is very slow - on average 2 seconds per row - on both ends of the transaction and this does not seem right. What can I do to improve it?
When the process is running, Task Manager shows that mysqld-nt is using as much of the CPU as it can get and the actual application is only using CPU time once in a while.
The basic client task is this:
-- Read a row from the local table
-- Encrypt the row
-- Write the encrypted row to the file
-- Repeat until all of the unexported data has been copied
The basic server task is the inverse:
-- Read a line from the file
-- Decrypt the line and construct a corresponding INSERT statement
-- Execute the INSERT
-- Repeat until end-of-file
Other possibly pertinent information:
-- Windows XP Pro
-- Visual Basic.Net
-- MySQL 4.1.14-nt
-- MyODBC 3.51.13
Dave Gee