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 IPC mechanism should be used?

Which IPC mechanism should be used?

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminbusinessquestion
5 Posts 3 Posters 0 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
    Sameerkumar Namdeo
    wrote on last edited by
    #1

    Hi all, [1]Having some 5 Client which are EXEs. And these 5 Clients need to communicate with a single Server which again is an EXE. All the clients and the single server are on same machine. [2]Clients can send some data to Server which server should store internally. [3]Clients can request some data which server should return. [4]Clients need result of executing some procedure and this procedure is in server. [5]Server need to keep track of all the client processes. Have gone through various mechanism like : [1]RPC which is robust but requires more work. [2]Named pipes [3]WM_COPYDATA Suggestion is required regarding which IPC mechanism should be used to achive all the above listed requirements. And roughly how much effort needs to be invested. Thanks.

    S B 2 Replies Last reply
    0
    • S Sameerkumar Namdeo

      Hi all, [1]Having some 5 Client which are EXEs. And these 5 Clients need to communicate with a single Server which again is an EXE. All the clients and the single server are on same machine. [2]Clients can send some data to Server which server should store internally. [3]Clients can request some data which server should return. [4]Clients need result of executing some procedure and this procedure is in server. [5]Server need to keep track of all the client processes. Have gone through various mechanism like : [1]RPC which is robust but requires more work. [2]Named pipes [3]WM_COPYDATA Suggestion is required regarding which IPC mechanism should be used to achive all the above listed requirements. And roughly how much effort needs to be invested. Thanks.

      S Offline
      S Offline
      sudhir_Kumar
      wrote on last edited by
      #2

      Are the 5 Clients are instances of same client EXE.

      -@SuDhIrKuMaR@-

      S 1 Reply Last reply
      0
      • S sudhir_Kumar

        Are the 5 Clients are instances of same client EXE.

        -@SuDhIrKuMaR@-

        S Offline
        S Offline
        Sameerkumar Namdeo
        wrote on last edited by
        #3

        No. They can be of different application.

        S 1 Reply Last reply
        0
        • S Sameerkumar Namdeo

          No. They can be of different application.

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

          If they are different applications then you can use WM_COPYDATA.It is very easy to use.

          -@SuDhIrKuMaR@-

          1 Reply Last reply
          0
          • S Sameerkumar Namdeo

            Hi all, [1]Having some 5 Client which are EXEs. And these 5 Clients need to communicate with a single Server which again is an EXE. All the clients and the single server are on same machine. [2]Clients can send some data to Server which server should store internally. [3]Clients can request some data which server should return. [4]Clients need result of executing some procedure and this procedure is in server. [5]Server need to keep track of all the client processes. Have gone through various mechanism like : [1]RPC which is robust but requires more work. [2]Named pipes [3]WM_COPYDATA Suggestion is required regarding which IPC mechanism should be used to achive all the above listed requirements. And roughly how much effort needs to be invested. Thanks.

            B Offline
            B Offline
            Bram van Kampen
            wrote on last edited by
            #5

            I have written software with your requirements, except that it could run on multiple networked machines. The approach I took was Named Pipes. I wrote a Generic Server, and a Generic Client, and, in effect, an RPC Procedure. In effect a 'SendMessage' procedure on the Client side, which gathered and wrapped all the Calling Info, created a Header, indicating where in the package each item resides, and, send it over the pipe. On the Server Side, you wait for the message, unwrap it, and present it to the function. For this to work, I created a MessageMap type of structure. For it to work better, Server and Client had only the Basic Bones in the Message Map for initial communication. At startup of the Client, it sends it's message map to the server, which the server registers. When you have this Generic Server/Client system written, you make each app both a server and a client. Be sure though to make plenty of use of Synchronisation Objects. N.B. The efford is always substantial, whatever route you take. I took this way because: 1. I considered RPC an overkill, and yet something else I had to learn and which Bill Gates could change on a whim. 2. Fully Debuggable, Very Few System calls you cannot debug into Regards :) Regards,

            Bram van Kampen

            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