PDA

View Full Version : Client-Server software project design question



MarkoSan
23rd March 2008, 02:17
Hi to all!

In my software project I have an arbitrary number of client modules connected via TCP/IP to my server module. Under my server there is an TCP/IP connection to MySQL server. To centralize mysql strings, used in whole application, I will write several/many/as many as needed stored procedures, which will reside in my mysql server scheme. So, what I do not know is, how to transfer a command for calling of one of these stored procedures from client via tcp/ip to server module and then again via tcp/ip from server to mysql server?
Since mysql does not support any "notifying mechanism" for for instance notifying a succesfull record addition/change/deletion, I must trigger database change notification to client module from my server module. Is this possible with existing database and tcpip qt classesd?!

Any help would be very appriciated.

Sincerely,
Marko

wysota
23rd March 2008, 08:52
I think you should deploy one of the existing RPC mechanisms/schemes. Some of them allow server-side initialized communication.

MarkoSan
23rd March 2008, 09:00
what do you mean by existing rpc scheme?

wysota
23rd March 2008, 09:02
Google for RPC.

MarkoSan
23rd March 2008, 09:08
well, I know what RPC is, but what I wanted to know, is it possible to use Qt's DBUS over tcp/ip?

wysota
23rd March 2008, 09:10
is it possible to use Qt's DBUS over tcp/ip?

Theoretically yes, but practically no. It's more of an IPC than RPC mechanism.

MarkoSan
23rd March 2008, 19:16
Is it safe to put a while loop into server class constructor and inside while to put listen method? I mean, is this right way to go?

wysota
25th March 2008, 09:31
Not really. You need to spin Qt's event loop.