Inter-process communication help needed

barttoo

Recruit
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.
 
Not sure what processing statistics to want to check on, but you are thinking a complicated route.

Why not just write all stats to a log file from the app (with some rotation logic) or to a SQL table. And develop a simple web page which will display/refresh the log file on http requests or a simple web service.

As you don't need real-time stats this approach should work fine.

If you want to do it as an exercise, you will need to make use of async web service calls. Here are some details on that -

how-do-you-measure-the-progress-of-a-web-service-call
 
From what i understood, I am saying. might be wrong.

There will be a APP running. 2 Process. The GUI and another exe, perhaps a COM application.

The COM application can handle all the variable value related stuff. It can process/acquire and then write the final values to a XML/ini/DB table. And maybe it can send a event/notification/message saying that all done.

GUI thread, ofc its the main thread also, can handle the things like reading from whatever source and updating the values in GUI. With the event processing obviously.

This is a offline thing i am saying. And from what i understood.

And didnt get what this is:

Is there a way like accessing web-service?
 
If you are comfortable with Native Win32 programming you can also explore the below methods, guess c# should have the equivalent methods also.

You can also create a shared Memory Mapped file and share it between your processes.

Another option is going the Named Pipe Way (MSDN>Pipes )
 
Hi guys,
Thank you for the great knowledge and support. It is more easier to implement MemoryMapped concept in C# though there is a slight delay. Would consider WCF is required enhancement. Anyway project completed, and thank you so much to all who have contributed great ideas.
 
Back
Top