Введение
Распределенная компонентная объектная модель (DCOM) — это запатентованная технология Microsoft для связи между программными компонентами в сети компьютеров. DCOM, первоначально называвшийся "Network OLE", является расширением Microsoft COM и предоставляет базовую подсистему связи в инфраструктуре сервера приложений Microsoft COM+. Переход к распределенному COM был обусловлен широким использованием DCE/RPC (Distributed Computing Environment/Remote Procedure Calls) — в частности, усовершенствованной версии Microsoft, известной как MSRPC. В плане расширений, добавленных к COM, DCOM должен был решить следующие задачи:
Distributed Component Object Model (DCOM) is a proprietary Microsoft technology for communication between software components on networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+ application server infrastructure. The extension COM into Distributed COM was due to extensive use of DCE/RPC (Distributed Computing Environment/Remote Procedure Calls) – more specifically Microsoft's enhanced version, known as MSRPC. In terms of the extensions it added to COM, DCOM had to solve the problems of:
Marshalling – serializing and deserializing the arguments and return values of method calls "over the wire". Distributed garbage collection – ensuring that references held by clients of interfaces are released when, for example, the client process crashed, or the network connection was lost. Combining significant numbers of objects in the client's browser into a single transmission in order to minimize bandwidth utilization. One of the key factors in solving these problems is the use of DCE/RPC as the underlying RPC mechanism behind DCOM. DCE/RPC has strictly defined rules regarding marshalling and who is responsible for freeing memory. DCOM was a major competitor to CORBA. Proponents of both of these technologies saw them as one day becoming the model for code and service reuse over the Internet. However, the difficulties involved in getting either of these technologies to work over Internet firewalls, and on unknown and insecure machines, meant that normal HTTP requests in combination with web browsers won out over both of them. Microsoft, at one point, attempted to remediate these shortcomings by adding an extra http transport to DCE/RPC called ncacn http (Network Computing Architecture connection oriented protocol). DCOM was publicly launched as a beta for Windows 95 September 18, 1996. DCOM is supported natively in all versions of Windows starting from Windows 95, and all versions of Windows Server since Windows NT 4.0
Маршализация — сериализация и десериализация аргументов и возвращаемых значений вызовов методов при передаче по сети. Распределенный сборщик мусора — обеспечение освобождения ссылок, удерживаемых клиентами интерфейсов, в случае, например, сбоя клиентского процесса или разрыва сетевого соединения. Объединение значительного числа объектов в браузере клиента в единую передачу для минимизации использования пропускной способности. Ключевым фактором решения этих задач стало использование DCE/RPC в качестве базового механизма RPC, лежащего в основе DCOM. DCE/RPC имеет строгие правила относительно маршализации и ответственности за освобождение памяти. DCOM был основным конкурентом CORBA. Сторонники обеих этих технологий рассматривали их как будущую модель повторного использования кода и сервисов через Интернет. Однако трудности с обеспечением работы этих технологий через интернет-брандмауэры и на неизвестных, небезопасных машинах привели к тому, что обычные HTTP-запросы в сочетании с веб-браузерами оказались более востребованными. Microsoft в определенный момент попыталась устранить эти недостатки, добавив в DCE/RPC дополнительный HTTP-транспорт под названием ncacn http (Network Computing Architecture connection oriented protocol). DCOM был публично представлен в бета-версии для Windows 95 18 сентября 1996 года. DCOM поддерживается нативно во всех версиях Windows, начиная с Windows 95, и во всех версиях Windows Server, начиная с Windows NT 4.0.
Distributed Component Object Model (DCOM) is a proprietary Microsoft technology for communication between software components on networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+ application server infrastructure. The extension COM into Distributed COM was due to extensive use of DCE/RPC (Distributed Computing Environment/Remote Procedure Calls) – more specifically Microsoft's enhanced version, known as MSRPC. In terms of the extensions it added to COM, DCOM had to solve the problems of:
Marshalling – serializing and deserializing the arguments and return values of method calls "over the wire". Distributed garbage collection – ensuring that references held by clients of interfaces are released when, for example, the client process crashed, or the network connection was lost. Combining significant numbers of objects in the client's browser into a single transmission in order to minimize bandwidth utilization. One of the key factors in solving these problems is the use of DCE/RPC as the underlying RPC mechanism behind DCOM. DCE/RPC has strictly defined rules regarding marshalling and who is responsible for freeing memory. DCOM was a major competitor to CORBA. Proponents of both of these technologies saw them as one day becoming the model for code and service reuse over the Internet. However, the difficulties involved in getting either of these technologies to work over Internet firewalls, and on unknown and insecure machines, meant that normal HTTP requests in combination with web browsers won out over both of them. Microsoft, at one point, attempted to remediate these shortcomings by adding an extra http transport to DCE/RPC called ncacn http (Network Computing Architecture connection oriented protocol). DCOM was publicly launched as a beta for Windows 95 September 18, 1996. DCOM is supported natively in all versions of Windows starting from Windows 95, and all versions of Windows Server since Windows NT 4.0
Улучшения безопасности
В рамках инициативы, начатой в Microsoft как часть процесса безопасной разработки программного обеспечения для переработки небезопасного кода, DCOM претерпел значительные изменения, направленные на повышение безопасности, в Windows XP Service Pack 2. В ответ на уязвимость в системе безопасности, обнаруженную лабораторией Tencent Security Xuanwu в июне 2021 года, Microsoft выпустила обновления безопасности для нескольких версий Windows и Windows Server, усилив контроль доступа к DCOM.
Альтернативные версии и реализации
COMsource – это реализация DCOM на базе Unix, обеспечивающая взаимодействие между различными платформами. Исходный код проекта доступен вместе с полной документацией, достаточной для использования и разработки совместимой версии DCOM. COMsource был получен непосредственно из исходного кода Windows NT 4.0 и включает в себя исходный код службы реестра Windows NT. В 1995 году компании Digital и Microsoft объявили о разработке Affinity for OpenVMS (также известного как NT Affinity), целью которой было использование OpenVMS в качестве уровня хранения данных для клиент-серверных приложений Windows NT. В рамках этой инициативы в OpenVMS Alpha была добавлена реализация распределенной объектной модели компонентов (DCOM). Для поддержки DCOM, VMS была обеспечена реализация реестра Windows, аутентификация NTLM и подмножество API Win32, необходимых для работы COM. DCOM впервые был добавлен в OpenVMS V7.2 1 для платформы Alpha. Аналогичная реализация DCOM была добавлена в Digital Unix в рамках программы AllConnect.