.NET Core 中沒有 AppDomains! 爲什麼? - No AppDomains in .NET Core! Why?

問題:

Is there a strong reason why Microsoft chose not to support AppDomains in .NET Core? Microsoft 選擇不支持 .NET Core 中的 AppDomains 是否有充分的理由?

AppDomains are particularly useful when building long running server apps, where we may want to update the assemblies loaded by the server is a graceful manner, without shutting down the server. AppDomains 在構建長時間運行的服務器應用程序時特別有用,我們可能希望以一種優雅的方式更新服務器加載的程序集,而無需關閉服務器。

Without AppDomains, how are we going to replace our assemblies in a long running server process?如果沒有 AppDomains,我們將如何在長時間運行的服務器進程中替換我們的程序集?

AppDomains also provide us a way to isolate different parts of server code. AppDomains 還爲我們提供了一種隔離服務器代碼不同部分的方法。 Like, a custom websocket server can have socket code in primary appdomain, while our services run in secondary appdomain.就像,自定義 websocket 服務器可以在主 appdomain 中擁有套接字代碼,而我們的服務在輔助 appdomain 中運行。

Without AppDomains, the above scenario is not possible.沒有 AppDomains,上述場景是不可能的。

I can see an argument that may talk about using VMs concept of Cloud for handling assembly changes and not having to incur the overhead of AppDomains.我可以看到一個論點可能會談論使用雲的 VM 概念來處理程序集更改,而不必招致 AppDomains 的開銷。 But is this what Microsoft thinks or says?但這是微軟的想法或說法嗎? or they have a specific reason and alternatives for the above scenarios?或者他們對上述情況有特定的原因和替代方案?


解決方案:

參考: https://stackoom.com/en/question/1qPMp
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章