Important: Please read the Qt Code of Conduct -

Qt application with server

  • Hello

    I developed a Qt application. Now I need a server with a remote database to implement new features. I don't want that the application is directly connected with the remote database. Indeed I think it isn't the best way. Communication will be done in RESTful.

    My quetion is how to implement the server. Should I necessarily do this with Qt or can I use other languages (for exemple java with tomcat) ... What are the differences between these two ways , a question of performance?

    Thank you

  • I always developed my server side component in Qt using QTcpServer with a "custom" communication protocol.
    But my applications don't need to communicate with 3rd party software.

    To follow this way I started from the Fortune Example.

    Honestly I don't know about performance but it works great.

  • Thank you for your answer !
    I think I will do .... 2 server.

    The first one in Qt (probably with QTcpServer -> thx for your link). My app will be always connected with it.

    The second server will offer an API rest and it will use a database.

    2 servers because later there will be a web application.

    My app will use these two servers ...
    I don't know if it's a good practice, Lack of experience ...

    What do you think about it ? Thx

  • I have similar situation.
    My App talk with the server using QTcpSocket/Server .
    The same server (and same application) provide rest like service using QtWebApp for web clients.
    I put both service on the same server application to share the same logic/code but you can also develop 2 independent services to optimize the load from different clients.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You also have the cutelyst project that might be of interest.

Log in to reply