Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. which should use pipe or socket at Client-server

which should use pipe or socket at Client-server

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmindata-structuresperformancequestion
8 Posts 4 Posters 1 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    singh_nav
    wrote on last edited by
    #1

    Hi All, I am working on a client server application. I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side. For this what should i use 1 PIPE implementation or SOCKET with a queue? and why? Which performance is better. Thanks

    K P S 3 Replies Last reply
    0
    • S singh_nav

      Hi All, I am working on a client server application. I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side. For this what should i use 1 PIPE implementation or SOCKET with a queue? and why? Which performance is better. Thanks

      K Offline
      K Offline
      kcynic
      wrote on last edited by
      #2

      i think if you have to use udp mode, socket might be better. otherwise i am afraid pipe is better because you just open and close a connect with every client but there would be more operations for socket. just my own opinion.

      1 Reply Last reply
      0
      • S singh_nav

        Hi All, I am working on a client server application. I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side. For this what should i use 1 PIPE implementation or SOCKET with a queue? and why? Which performance is better. Thanks

        P Offline
        P Offline
        Parthiban
        wrote on last edited by
        #3

        hi, U can use the following arch if u think this better. go with TCP/IP. 1. create one sock which will be in listen mode. 2. once u got a connect request, create one sock and thread dynmically and bind with the requested client. this socket will serve for that client only. this can be implemented in multithread mode where on thread always listen for client, and each thread will serve for perticular client. -Parthi

        1 Reply Last reply
        0
        • S singh_nav

          Hi All, I am working on a client server application. I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side. For this what should i use 1 PIPE implementation or SOCKET with a queue? and why? Which performance is better. Thanks

          S Offline
          S Offline
          SandipG
          wrote on last edited by
          #4

          I will suggest to use IO Completion Ports with sockets. i will not advise to have 250 threads for 250 clients... Search CP with IOCP you will get many good articles.. I hope it helps.

          Regards, Sandip.

          S 1 Reply Last reply
          0
          • S SandipG

            I will suggest to use IO Completion Ports with sockets. i will not advise to have 250 threads for 250 clients... Search CP with IOCP you will get many good articles.. I hope it helps.

            Regards, Sandip.

            S Offline
            S Offline
            singh_nav
            wrote on last edited by
            #5

            Thanks for the input, Will it work for the different platform. I am to create the server for WINDOWS, Linux and MAC. Thanks

            S 1 Reply Last reply
            0
            • S singh_nav

              Thanks for the input, Will it work for the different platform. I am to create the server for WINDOWS, Linux and MAC. Thanks

              S Offline
              S Offline
              SandipG
              wrote on last edited by
              #6

              singh_nav wrote:

              I am to create the server for WINDOWS, Linux and MAC.

              No.. I dont know anything that will work with all three platforms. I don't understand why server needs to be built for different platforms. You can have a server on one platform and you can built clients on different platforms. Your application might have that requirement but just a opinion.

              Regards, Sandip.

              S 1 Reply Last reply
              0
              • S SandipG

                singh_nav wrote:

                I am to create the server for WINDOWS, Linux and MAC.

                No.. I dont know anything that will work with all three platforms. I don't understand why server needs to be built for different platforms. You can have a server on one platform and you can built clients on different platforms. Your application might have that requirement but just a opinion.

                Regards, Sandip.

                S Offline
                S Offline
                singh_nav
                wrote on last edited by
                #7

                thanks, Actually my application is build for all these platform. And i want to design all code into one application, that time i just need to build at different platform only to support it. Thanks again

                S 1 Reply Last reply
                0
                • S singh_nav

                  thanks, Actually my application is build for all these platform. And i want to design all code into one application, that time i just need to build at different platform only to support it. Thanks again

                  S Offline
                  S Offline
                  SandipG
                  wrote on last edited by
                  #8

                  Recently i came across this library http://www.alhem.net/Sockets/index.html[^] I hope it helps.

                  Regards, Sandip.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups