CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Location
    G day Mayt Land
    Posts
    971

    Passing data between 2 processes not run simultaniously

    How would you pass Data (objects) from one process to another that are NOT running simultaniously but in sequentially WITHOUT the use of a database or a file in between?


    process 1 starts
    ..... ----->
    process 1 ends |
    |
    +===================+
    | Data object |
    +===================+
    |
    process 2 starts |
    .... <------
    process 2 ends

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Passing data between 2 processes not run simultaniously

    I think MSMQ could help with this.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  3. #3
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Passing data between 2 processes not run simultaniously

    Quote Originally Posted by Saeed View Post
    WITHOUT the use of a database or a file in between?
    Not possible without using some kind of interface as mentioned in post # 2, use MSMQ, or the way I would do it is, serialize the object and then save the XML in a file or database then have another program access it.

    Now as you have said, you want it without File or database, then MSMQ will be your better option, but that also adds litle more complexity in terms of how much of MSMQ does your team know.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Passing data between 2 processes not run simultaniously

    May I suggest that you abstract the storage out of the problem and decide on the interface that both applications call. A simple solution would be to use WCF as the interface. Just define an interface with a couple of setters/getters for the data. Internally the WCF service could then use any storage medium it desires (in memory, file, xml file, message queuing, database, registry, etc.). The applications would need to know the details of the storage (and you could swap it out if need be).

    Btw, why the hard rule for not using a file or database?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured