Results 1 to 8 of 8

Thread: Client-Server software project design question

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Red face Client-Server software project design question

    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
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Client-Server software project design question

    I think you should deploy one of the existing RPC mechanisms/schemes. Some of them allow server-side initialized communication.

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Client-Server software project design question

    what do you mean by existing rpc scheme?
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Client-Server software project design question

    Google for RPC.

  5. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Client-Server software project design question

    well, I know what RPC is, but what I wanted to know, is it possible to use Qt's DBUS over tcp/ip?
    Qt 5.3 Opensource & Creator 3.1.2

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Client-Server software project design question

    Quote Originally Posted by MarkoSan View Post
    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.

  7. #7
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Client-Server software project design question

    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?
    Qt 5.3 Opensource & Creator 3.1.2

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Client-Server software project design question

    Not really. You need to spin Qt's event loop.

Similar Threads

  1. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 18:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.