FrankJensen
September 20th, 2009, 07:36 AM
I made a quite simple AsyncSocket project. One server program, connecting to a SQL database on the server, and one client program, receiving and displaying data.
What I do, from the client side, is to request data from the server, and the data sends one record from the database in plain text. The socket and the SQL database stays open, and the client now just requests NEXT, NEXT etc. until EOF.
All records are received. But its quite slow. Only 4-5 records apear a second. Running both server and client program on same computer improved this, but it still takes much longer than expected - the database have many rows, but each row do not contain much data.
Removing the NEXT handshake, and just send out everything, makes the transfer stop after a short while. Like some kind of overflow somewhere. No error messages apear, and everything seems to be sent, its just not received.
Basically, what I want to do, is to have all SQL code and calculations on the server, so that the client just displays the result. Cause some of the calculations I do, is much, much faster on the server directly, than tru the network - well, not at the moment, but that was the plan, making use of timeconsuming calculations over a relative slow network, and with a slow client computer (compared to a super-server).
What I do, from the client side, is to request data from the server, and the data sends one record from the database in plain text. The socket and the SQL database stays open, and the client now just requests NEXT, NEXT etc. until EOF.
All records are received. But its quite slow. Only 4-5 records apear a second. Running both server and client program on same computer improved this, but it still takes much longer than expected - the database have many rows, but each row do not contain much data.
Removing the NEXT handshake, and just send out everything, makes the transfer stop after a short while. Like some kind of overflow somewhere. No error messages apear, and everything seems to be sent, its just not received.
Basically, what I want to do, is to have all SQL code and calculations on the server, so that the client just displays the result. Cause some of the calculations I do, is much, much faster on the server directly, than tru the network - well, not at the moment, but that was the plan, making use of timeconsuming calculations over a relative slow network, and with a slow client computer (compared to a super-server).