Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For those of you interested in the actual implementation of multi-process apps, I wrote an article about it on my website: <strong><a href="http://wyday.com/blog/2010/multi-process-c-sharp-application-like-google-chrome-using-named-pipes/" rel="noreferrer">Multi-process C# app like Google Chrome</a></strong>.</p> <p>I've included working C# code. It's been tested to work with .NET 2.0, .NET 3.0, and .NET 3.5.</p> <h2>Named pipes: How processes talk to eachother</h2> <p>Since your question specifically asked about Google Chrome you should know that <a href="http://dev.chromium.org/developers/design-documents/inter-process-communication" rel="noreferrer">Chrome uses named pipes</a> to communicate between processes.</p> <p>In the C# source code I mentioned above there are 2 files: PipeServer.cs &amp; PipeClient.cs. These 2 files are thin wrappers of the Named Pipes Windows API. It's well tested because hundreds of thousands of people use our products. So stability &amp; robustness were a requirement.</p> <h2>How we use the multi-process design</h2> <p>Now that you have all the pieces to the puzzle, let me tell you how we use Multi-process design in our app.</p> <p>Our product is a complete updater solution. That is, there's a program <a href="http://wyday.com/wybuild/" rel="noreferrer">that builds update patches</a> (not relevant to the discussion), a standalone updater program (<a href="http://wyday.com/wyupdate/" rel="noreferrer">wyUpdate - also open source</a>), and an <a href="http://wyday.com/wybuild/help/automatic-updates/" rel="noreferrer">Automatic Updater control</a> that our users put on their C# or VB.NET forms.</p> <p>We use named pipes to communicate between the standalone updater (wyUpdate) and the Automatic Updater control sitting on your program's form. wyUpdate reports progress to the Automatic Updater, and the Automatic Updater can tell wyUpdate to cancel progress, to start downloading, start extracting, etc.</p> <p>In fact, the exact named pipes code we use is included in the article I mentioned above: <strong><a href="http://wyday.com/blog/2010/multi-process-c-sharp-application-like-google-chrome-using-named-pipes/" rel="noreferrer">Multi-process C# app like Google Chrome</a></strong>.</p> <h2>Why you shouldn't use the multi-process design</h2> <p>As Jon Skeet mentioned above, you should have a specific need for the multi-process model. In our case we wanted to keep the updater completely separate from your program. That way if the updater somehow crashed, your program would remain unscathed. We also didn't want to duplicate our code in 2 places.</p> <p>That being said, even with our well-tested Named Pipes wrapper, inter-process communication is hard. So tread carefully.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload