镀铬/ IE8多进程设计,是否有可能在.NET? [英] Chrome / IE8 multi-process design, is it possible in .NET?

查看:164
本文介绍了镀铬/ IE8多进程设计,是否有可能在.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谷歌Chrome和IE8(其中包括)旨在通过在一个单独的进程隔离每个选项卡(网页)(过于简单,我知道),以提供更高的可靠性/稳定性。

Google Chrome and IE8 (among others) aim to provide greater reliability/stability by isolating each tab (web page) in a separate process (over-simplified, I know).

这似乎是更重量级的那么多个线程,但在一个进程没有打倒整个应用程序崩溃的主要优势。

This would seem to be much more heavyweight then multiple threads, but has the major benefit of a crash in one process not bringing down the whole application.

看来多个处理架构早已在服务器端应用程序(例如,Web服务器)被使用,但这些都是没有专用的GUI的过程。有趣的是,它现在被用在桌面应用程序的用户界面。

It seems the multiple process architecture has long been used in server side applications (eg. web servers), but these are processes without a dedicated GUI. It's interesting that it is now being employed in the user interfaces of desktop applications.

我如何去实现这一点说,Windows窗体.NET应用程序?它甚至有可能?

How would I go about implementing this in say a Windows Forms .NET application? Is it even possible?

的Process.Start()是查找一个明显的首位,但该新进程的GUI是不紧密地与宿主应用程序的图形用户界面集成在一起。这是一个新的独立的应用程序,而非主机应用程序的子控制/窗口,因为它是与镀铬/ IE8。

Process.Start() is an obvious first place to look, but the GUI of the new process is not tightly integrated with the GUI of the host application. It's a new standalone application, not a sub control/window of the host application, as it is with Chrome/IE8.

(对于任何有兴趣斯科特Hanselmann写了一个很好的介绍,到这里IE8多进程架构

(For anyone interested Scott Hanselmann wrote a good intro. to the IE8 multi-process architecture here.)

[更新]

更具体地说:

如何单独的子流程直接渲染到主流程中的用户界面?这是真正发生了什么,或建议的意见,并在子过程中使用的IPC问的主要过程来呈现呢?

How can a separate "sub-process" render directly to the UI within the "main process"? Is this actually what is happening, or as was suggested in comments, does the sub-process use IPC to ask the main process to render for it?

推荐答案

一个更好的选择,以在.NET中使用多个进程会使用多个应用程序域来代替。这只有在创建1实际的Windows进程,但仍然给中多个区域的增加稳定性的优势(即在一个AppDomain中崩溃将只需要一个下来,而不是整个应用程序)。

A better option to using multiple processes in .NET would be to use multiple AppDomains instead. This has the advantage of only creating one actual Windows process, yet still giving the added stability of multiple areas (i.e. a crash in one AppDomain would only take that one down, not the whole app).

有与此相关的成本,因为对象需要跨应用程序域边界以便进行序列化。这可能是更容易发展比多进程模式,虽然。

There are costs associated with this, since objects need to be serialized across AppDomain-boundaries. It might be easier to develop than a multi-process model, though.

这篇关于镀铬/ IE8多进程设计,是否有可能在.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆