1

What I have:

Two console applications (target framework 4). Application A does all the work, B displays status every 10 seconds. A runs through nearly 300,000 sql entries and performs miscellaneous work - output is most verbose and its hard to squeeze in general overview information about progress.

What I need:

My goal would be to have A first execute B and then "send" or pass strings over to B so that it can refresh itself with the new values of those strings. It would provide the user who is observing a good indication of what's going on with the whole operation.

What do you recommend to accomplish this. WCF, named pipes? I guess I could make app A the server and app B a client of some sorts.

Visual example: note that application A has about 10x more text (picture is just example)

http://metroidcoven.com/idea.PNG

Ray Alex
  • 475
  • 2
  • 5
  • 17
  • 3
    Why have 2 apps? Why not multithread it and just update `A`? – Dave Zych Oct 11 '12 at 15:53
  • Do you plan on having multiple **B** 's attach to a single **A**? Or have **B** be on a different machine? – lc. Oct 11 '12 at 15:53
  • There will only be a single A and single B - they both will exist in the same directory (local communication only). There will not be multiple instances launched. I am about to update the original question with a better explanation. – Ray Alex Oct 11 '12 at 15:57
  • Mupltiple instances of A or B? – lboshuizen Oct 11 '12 at 16:06

2 Answers2

0

When one process is spawning another, it can obtain its Standard Input/Output streams, so that you can read, write:

http://www.dotnetperls.com/redirectstandardoutput

Bartosz
  • 3,318
  • 21
  • 31
0
  • Make B first execute A.
  • A write its verbose logging to standard output.
  • B reads A's standard output (google how you can redirect input/output/err of a process)
  • B aggregate information and write a clean log on its standard output.
  • When A exits, B exits too.

Simple !

Nicolas Repiquet
  • 9,097
  • 2
  • 31
  • 53