-
May 6th, 2011, 10:24 PM
#1
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.
-
May 7th, 2011, 04:13 PM
#2
Re: Inter-process communication help needed
Originally Posted by barttoo
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.
-
May 8th, 2011, 03:38 AM
#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.
-
May 8th, 2011, 03:12 PM
#4
Re: Inter-process communication help needed
Originally Posted by barttoo
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.
-
May 8th, 2011, 04:20 PM
#5
Re: Inter-process communication help needed
Originally Posted by barttoo
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.
-
May 10th, 2011, 09:18 PM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|