Results 1 to 7 of 7

Thread: Client-Server Application design suggestion

  1. #1
    Join Date
    Jul 2007
    Posts
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Client-Server Application design suggestion

    Hi,first i want to thank everyone who helps in this forums, i have learned a lot thanks to you guys

    Well here is my problem :

    I am developing a client server application, the server connects to the database
    and the client connects to the server using the QTcpSocket

    The idea is that the client sends request to the server so the server performs some action to the database ( inserting records or retrieve a set of records using select for example ), this requests are sent to the server using XML to encapsulate the commands, and the server answers to the client using XML too

    1) is there an XML protocol based in QT4 that i can use or i have to design it from zero ?
    2) Suppose that the server receives a "SELECT * from User" request ( parsed from the XML protocol ) then the server must perform the solicited action on the database and somehow send the set of records to the client, what would be the best way to serialize the answer ? it must include blobs in case it is necesary
    3) once the data has arrived to the client using the XML protocol what would be the most eficient way to use it ? should i fill it on a QStandaridItemModel for example ?

    thank you very much for your ideas

    PD: sorry my bad english

  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 Application design suggestion

    Quote Originally Posted by berzeck View Post
    Hi,first i want to thank everyone who helps in this forums, i have learned a lot thanks to you guys
    Thx

    1) is there an XML protocol based in QT4 that i can use or i have to design it from zero ?
    Search the forums (or google) for XML-RPC.

    2) Suppose that the server receives a "SELECT * from User" request ( parsed from the XML protocol )
    Never do that. This is a plain way to abuse the protocol. You should have a set or commands which are safe to execute and don't allow a "do anything you want" command.

    then the server must perform the solicited action on the database and somehow send the set of records to the client, what would be the best way to serialize the answer ? it must include blobs in case it is necesary
    SOAP protocol (or similar) is just the thing for you. Qt XML-RPC probably does what you want.

    3) once the data has arrived to the client using the XML protocol what would be the most eficient way to use it ? should i fill it on a QStandaridItemModel for example ?
    It really depends what the data is and what you intend to do with it.

    BTW. If XML is not a requirement, search forums and google for Qt+IPC - some other solutions might pop up. If you are willing to pay for a solution, then Thorsen Consulting have a nice library for IPC.

  3. #3
    Join Date
    Jul 2007
    Posts
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Client-Server Application design suggestion

    Thank you very much for your answer i will check it out for Qt XML-RPC as you suggested

    I will post here when i have studied the solution

    thank you again

  4. #4
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Client-Server Application design suggestion

    Hi,

    Personally I would use webservices

  5. #5
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Client-Server Application design suggestion

    Maybe an object oriented middleware will help you:
    www.zeroc.com

    Good luck,

    Tom

  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 Application design suggestion

    Quote Originally Posted by steg90 View Post
    Hi,

    Personally I would use webservices
    Webservices are exactly the same as XML-RPC. It's an approach, not a unique solution.

  7. #7
    Join Date
    Dec 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Client-Server Application design suggestion

    Quote Originally Posted by berzeck View Post
    Thank you very much for your answer i will check it out for Qt XML-RPC as you suggested

    I will post here when i have studied the solution

    thank you again
    Hi,

    there is a Qt based application server that supports XML-RPC based on web services: FEAST

    http://trolltech.com/partners/direct...ers/clausmark/

    http://dist.trolltech.com/pdf/Clausm...nBrief_web.pdf

    http://www.clausmark.com/feast_en.phtml

    FEAST handles the concurrent user situation as well as taking care of
    backend data sources with connection pooling etc. Actually FEAST is more
    then a server; it is development framework for distributed applications
    based on Qt.

    FEAST uses SOAP HTTP as the communication protocol (it does not rely on
    gSOAP though) so it is easy to use over the internet through firewalls
    etc.

    /Niklas

Similar Threads

  1. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  2. 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.