CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2011
    Posts
    3

    Inter-process communication help needed

    Hi,
    I am new here. I need some help on inter-process communication.

    I am developing a high performance console app in C# 4.0. The reason i chose console to winform because to minimize the GUI thread overheads. But i need to view the processing statistics from time to time (occasionally only, to check not monitoring). Just few variables values need to be accessed.

    1. Is there a way like accessing web-service? let's say i have some volatile variables signed as public in a public class.

    Any suggestion will be considered a help, as i need some ideas. Thank you guys.

  2. #2
    Join Date
    Oct 2006
    Posts
    82

    Re: Inter-process communication help needed

    Quote Originally Posted by barttoo View Post
    Hi,
    I am new here. I need some help on inter-process communication.

    I am developing a high performance console app in C# 4.0. The reason i chose console to winform because to minimize the GUI thread overheads. But i need to view the processing statistics from time to time (occasionally only, to check not monitoring). Just few variables values need to be accessed.

    1. Is there a way like accessing web-service? let's say i have some volatile variables signed as public in a public class.

    Any suggestion will be considered a help, as i need some ideas. Thank you guys.
    I created a web service in a Vb course some years back. Its not difficult, but it is awkward to explain. It would be best if you did the research via a tutorial. Look for the book for MCTS .Net Framework Vx Distributed Application Development. (I used one for V2). In my assignments we used the SOAP header to pass info, but there may be other ways.

  3. #3
    Join Date
    May 2011
    Posts
    3

    Re: Inter-process communication help needed

    Hi, thanks for the great effort. Nevertheless you have already mentioned. there must be other ways. My concern is, not to make the main-app as web service. Just some simple ways to access some tiny variables from this main-app to display to the web or winfroms. Not kind of monitoring(on interval basis) but upon user's request. The main app is built for performance, so i don't want to add any extra stuff into it.

  4. #4
    Join Date
    Oct 2006
    Posts
    82

    Re: Inter-process communication help needed

    Quote Originally Posted by barttoo View Post
    Hi, thanks for the great effort. Nevertheless you have already mentioned. there must be other ways. My concern is, not to make the main-app as web service. Just some simple ways to access some tiny variables from this main-app to display to the web or winfroms. Not kind of monitoring(on interval basis) but upon user's request. The main app is built for performance, so i don't want to add any extra stuff into it.
    I think, in that case, you should explain the environment a bit more. Ex: will the main app just sit there and work unattanded. Where will the info collection app be: in another computer, on an internal LAN or over the web? These affect how you might be able to collect the info.

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

    Re: Inter-process communication help needed

    Quote Originally Posted by barttoo View Post
    Hi, thanks for the great effort. Nevertheless you have already mentioned. there must be other ways. My concern is, not to make the main-app as web service. Just some simple ways to access some tiny variables from this main-app to display to the web or winfroms. Not kind of monitoring(on interval basis) but upon user's request. The main app is built for performance, so i don't want to add any extra stuff into it.
    If reliability and up time is important you may want to reconsider putting the main app in a console. From your description, your app screams windows service (which have builtin recovery options and autostart).

    That being said, it doesn't much matter if you decide to keep the 'main' app as a console, you need to expose it's data to external apps (winform, web, web service, etc.).

    There are lots of ways to do perform interprocess communication:
    1) Named pipes
    2) Memory mapped files
    3) .Net remoting
    4) Expose the app as a web service
    5) Host a 'WCF' service inside the 'main' app.

    Just because you add 'extra' stuff to the main app, doesn't mean it will have an adverse effect on performance. If you need to expose the 'main' app's functionality to external processes, you're going to need to add some code.

    As far as the list above, my preference would be to use 5) WCF service host inside the 'main' app.

  6. #6
    Join Date
    May 2011
    Posts
    3

    Re: Inter-process communication help needed

    Hi Arnold,
    At the moment it is a console app created purely in c#. It runs on win7 and win-2008. It was built to process transaction received from client, process and feed another host application. All communication is done on socket.

    At this burst of processing, some variables like trasaction-count, invalid-count, all of int32 type required to be accessed from time to time, not on interval but upon user request. Put it this way:

    1. Signal received for transaction-detail request from external-app
    2. Upon request for transaction-detail, send the info to the requested app.

    I know this may sound very much like a call to wcf. In this case, would the extra wcf-code to the current app slows the execution, (logically more lines will be added in the assembly file). If so, any other better solution. Thanks guys for the great insight.

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