Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Server programming best practises

Server programming best practises

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zoptune
    wrote on 4 Jul 2017, 09:43 last edited by
    #1

    Hi,

    I have a desktop app that allow me to interact with a machine. The app works fine but now i want to convert it to a server and replace my UI by a web page.
    My app will act like an RPC server.

    But this is the first time i'm using network with Qt and i'm confused between Low-level, High-level API and WebSocket.

    Can someone explain me the difference and tell me what is the best choice in my case ?

    Thanks

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 4 Jul 2017, 10:22 last edited by
      #2

      The two most common ways of interaction are SOAP and REST.

      For the first one you can use KDSoap library, for the second one you probably need to go lower level

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • Z Offline
        Z Offline
        Zoptune
        wrote on 4 Jul 2017, 11:11 last edited by Zoptune 7 Apr 2017, 12:00
        #3

        Hi @VRonin and thank you for your reply. I will use REST.
        Can you tell me what should i use between TcpSocket, Network Access API or WebSocket ?

        Actually i'm planning to do like in the WebSocket/echoserver example but maybe it is not a good solution.

        K 1 Reply Last reply 4 Jul 2017, 21:00
        0
        • Z Zoptune
          4 Jul 2017, 11:11

          Hi @VRonin and thank you for your reply. I will use REST.
          Can you tell me what should i use between TcpSocket, Network Access API or WebSocket ?

          Actually i'm planning to do like in the WebSocket/echoserver example but maybe it is not a good solution.

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 4 Jul 2017, 21:00 last edited by
          #4

          REST runs over http (as far as I remember), so my bet would be QNetworkAccessManager and friends.

          Read and abide by the Qt Code of Conduct

          V 1 Reply Last reply 5 Jul 2017, 06:52
          2
          • K kshegunov
            4 Jul 2017, 21:00

            REST runs over http (as far as I remember), so my bet would be QNetworkAccessManager and friends.

            V Offline
            V Offline
            VRonin
            wrote on 5 Jul 2017, 06:52 last edited by
            #5

            @kshegunov said in Server programming best practises:

            so my bet would be QNetworkAccessManager and friends

            Yeah, probably the friends part is not trivial as you'd need a web server rather than a web client but googleing quickly popped up a few results

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            K 1 Reply Last reply 5 Jul 2017, 11:21
            0
            • V VRonin
              5 Jul 2017, 06:52

              @kshegunov said in Server programming best practises:

              so my bet would be QNetworkAccessManager and friends

              Yeah, probably the friends part is not trivial as you'd need a web server rather than a web client but googleing quickly popped up a few results

              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 5 Jul 2017, 11:21 last edited by
              #6

              @VRonin said in Server programming best practises:

              Yeah, probably the friends part is not trivial as you'd need a web server rather than a web client

              Ooops, sorry, I was thinking about client side. You're right, it's going to be more involved for the server side ...

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0

              2/6

              4 Jul 2017, 10:22

              topic:navigator.unread, 4
              • Login

              • Login or register to search.
              2 out of 6
              • First post
                2/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved