What Is Distributed Component Object Model (DCOM)? Meaning, Working, and Purpose

essidsolutions
  • Distributed component object model (DCOM) is defined as a proprietary networking standard by Microsoft that allows two different app components on different Windows machines to interact with each other despite residing in different environments and programming languages.
  • DCOM improves upon the component object model (COM) by allowing interactions across a vast network.
  • This article explains how DCOM works and details how this model is used in modern computing.

What Is Distributed Component Object Model (DCOM)?

Distributed component object model or DCOM is the proprietary networking standard by Microsoft that allows two different application components on different Windows machines to interact with each other despite residing in different environments and programming languages. DCOM improves upon COM by allowing interactions across a vast network.

Working of DCOM

Source: GeeksforGeeksOpens a new window

*DCE RPC stands for Distributed Computing Environment/Remote Procedure Calls

DCOM is an extension of the component object model (COM), which enables software components to communicate across multiple systems on a wide area network (WAN), local area network (LAN), or the internet. Microsoft created DCOM to distribute COM-based applications in a manner that was impossible just with COM.

DCOM is a component of programming that enables a computer to execute programs on another computer over a network as if they were operating locally. It is a Microsoft-exclusive software component utilized by businesses that use Windows to facilitate communications among external and internal stakeholders working on separate devices.

To understand what DCOM is, we must first understand COM in more detail.

What is component object model (COM)?

COM is a Microsoft specification methodology that specifies a binary standard for swapping code across two systems, regardless of the operating system or programming language. COM offers access to dispersed client object functionalities and is utilized to share binary code and programming languages across multiple platforms.

COM isn’t a programming language but instead a standard. COM’s purpose is to enable the construction of applications using components. Such COM components can be developed by various vendors during different periods and with various programming languages.

Additionally, COM components can operate on different devices and operating systems. This is because COM defines a standard way to set out virtual function tables (vtables) in memory. It is also an established approach toward executing functions through vtables for any specific platform (operating system with hardware combinations). Thanks to COM, any language capable of calling algorithms (C, C++, or even BASIC) can produce components compatible with additional elements created as per the identical binary standard.

COM lets objects written in dissimilar object-oriented programming (OOP) languages communicate. For instance, C++ objects can send messages to Java objects. It is intended to conceal the specifics of each object and emphasize its capabilities.

This is also the main value proposition of DCOM, only this time operating across networks.

The following concepts are crucial to the working of COM:

  • COM Interfaces: These interfaces are how COM objects make their functionality accessible to apps and additional components. COM objects can have numerous interfaces. Each interface has a unique interface identifier (IID).
  • IUnknown: This is the fundamental COM interface upon which all others are founded. It provides mechanisms for referential counting along with interface querying. IUnknown enables access across every interface that the object displays.
  • Reference Counting: This is the mechanism through which an interface establishes that it is no longer in use and, as such, is free to withdraw itself.
  • QueryInterface: It is the IUnknown technique for querying an object for the specified interface.
  • Aggregation: This refers to a technique that allows one object to utilize another.
  • Marshaling: This mechanism enables using objects spanning thread, processing, and networking borders, thereby facilitating autonomy in location.

Several of these concepts are essential for DCOM’s working as well.

See More: What Is FTP (File Transfer Protocol)? Definition, Uses, and Best Practices for 2022

Key features of DCOM

DCOM provides two major benefits to developers: geolocational agnosticism and packaging agnosticism. Being indifferent to geolocation is the capacity for dispersing client applications independent of local objects. Packaging agnosticism is the ability to carry out in-process objects.

Despite operating in the background, DCOM comes with powerful features. Based on the object-oriented programming model COM, it offers several important extensions.

  • Free-threaded Objects: DCOM expands COM’s threading functionality to encompass fully multithreaded (free-threaded) objects. Multithreading is the capacity of a program or operating system to handle several users’ demands without requiring multiple instances of the program to be launched on the computer. Building scalable applications on the server side relies heavily on this feature.
  • Activation or Launch Security: Using Windows NT’s (previously New Technology) list of access controls, one can determine which users are permitted to launch particular object servers. Object servers activate local, remote, and in-process objects. DCOM allows only machine administrators to initiate object servers via remote clients by default; however, this can be modified or bypassed.
  • Local Launch Security: Also included in security measures are local launch requests. This is essential for Win32 services that operate according to the localized system account. Using DCOM, you can configure object servers activated by a remote client to function as per a particular user account.
  • Call and Access Security: Along with being able to launch security, users can also specify which clients are permitted to connect to object servers. As in launch security, this function can be configured as a machine preset or on a per-server basis. This safety feature also pertains to requests for localized access.
  • Call-level Security: DCOM enables the application of security controls to specific attributes or functionalities of the object server. Every interface may possess unique remote authorization and authentication parameters.

These features define the distributed component object model and make it a significant improvement on COM.

Importance of DCOM

Modern operating systems isolate processes from one another. A client computer requiring permission to interact with an element in another process can’t directly contact the component but must use an operating system-led method for communication between processes.

This communication is provided by COM in an entirely transparent manner. It intercepts messages from the client and transmits them to the necessary element in another process. DCOM merely replaces native inter-process interactions with a network protocol when the client and component exist on distinct computer networks. Both the client and the component are unaware of the lengthening of the connecting wire.

Any distributed application component created is an option for future reuse. By structuring the development process surrounding the component paradigm, it is possible to perpetually increase the level of utility in new apps while minimizing time-to-market by reusing previous deployments.

See More: What Is Network Time Protocol (NTP)? Meaning, Working, Benefits, and Challenges

How Does DCOM Work?

The distributed component object model works by establishing a connection between two components written in two different or identical languages running within applications hosted on two different computers on a network.

The process of establishing this connection is fairly simple, as listed below.

  • The client computer proposes that the remote one constructs an object identified by its CLSID or ProgID. CLSID, which means Class ID identifies a COM object. A ProgID is a registry item that can be linked with a CLSID.
  • After receiving the application ID or APPID from the client, the remote computer searches for the CLSID via the ProgID.
  • The remote machine verifies the client’s permissions to construct the object by examining the APPID. DCOMLaunch.exe (if an exe) or DLLHOST.exe (if a dll) will generate an instance of the class the client computer demands.
  • The communication is thereby effective. The client now has access to all class functions on the remote machine.

If the APPID isn’t configured properly, the client doesn’t have the necessary permissions, the CLSID points to an obsolete version of the executable, or if any of several other issues exist, you will likely receive the ‘Can’t Create Object’ notification, and DCOM will stop working. This is the reason why it is essential to follow a set of best practices to ensure that DCOM works correctly:

1. Check the Windows Registry for the correct CLSID

Windows maintains a CLSID for every class deployed in an application. When executing a class, the precise CLSID is required so that Windows recognizes where to look for the program. Microsoft provides several tools to repair CLSID errors to ensure that DCOM works correctly.

2. Choose distinct ProgIDs

The programmatic identifier (ProgID) is an auxiliary identifier that can replace the more complex and stringent CLSID. Typically, ProgIDs are easy to understand and perceive. No limitations are there on the number of ProgIDs that can share an identical name, which can occasionally cause problems.

3. Ensure apps and components have correct permission levels to access APPID

The application identifier (APPID) specifies the classes and permissions required to access an executable. DCOM will not function if the APPID is incorrect. You will likely encounter permission errors when seeking to construct a remote object, which is a sign that you need to check your permissions.

See More: What Is a Subnet Mask? Definition, Working, and Benefits

Applications of DCOM

The following are some of the major applications and use cases of DCOM.

DCOM Applications

1. High-performance distributed applications on a network

Several opposing architectural limitations become evident when implementing an application distributed on a network. For instance, components that interact frequently ought to be ‘closer’ to one another. Smaller components increase deployment flexibility but boost network traffic.

Since deployment details are not provided in the source code, it is relatively simple to circumvent such critical design restrictions with DCOM. It completely conceals the location of a component, even though it is in the same operation as the end user or on a machine that is halfway around the globe.

The manner in which a client joins an element and uses its methods is always the same. Not only does DCOM not require any modifications within the source code, but it also does not require the program to be recompiled. This vastly improves performance even on distributed networks.

2. Rapid prototyping in the preferred language of the developer

Throughout the design and execution of a distributed application, selecting the language or the tool for a specific part is a common challenge. Typically, language selection is a compromise between production expenses, available knowledge, and efficiency. This considerably lengthens the prototyping process and extends time-to-market.

Thankfully, as a derivative of COM, DCOM is entirely language-independent. Virtually any programming language can be employed to build COM components; even additional languages and tools can use those components. DCOM is compatible with Java, Microsoft Visual C++, Microsoft Visual Basic, and COBOL.

Powered by DCOM’s language autonomy, app creators can select the most common tools and programming languages. This allows for fast prototyping. Components can be initially created in a higher-level language, such as Microsoft Visual Basic, then reinstated in a different language, such as C++ or Java, which takes advantage of sophisticated features like DCOM’s multithreading.

3. Connection management for better resource efficiency

Network connections are fundamentally more vulnerable than machine connections. The components of a distributed application must be informed if a client is no longer active, particularly in the event of network congestion or hardware malfunction.

DCOM administers connections to elements either allocated to a single user or shared among multiple clients. It accomplishes this by keeping track of a reference count for each element. This is how it achieves this:

    • DCOM increments a component’s reference count whenever a client initiates an interaction with it.
    • DCOM reduces the component’s referencing count when the client closes its connection.
    • If the count hits zero, the element can release itself.

This enables DCOM to determine whether clients are still operational. As a result, it can conserve the application’s resources and only focus on active connections.

4. Distributed applications that can scale up or down depending on the number of users

The ability of a distributed application to scale according to the number of users, the volume of information, and the necessary features is vital. The application must be compact and quick when demand is low; however, it must have the ability to accommodate increased demand without compromising on performance or dependability. DCOM provides several features that boost the scalability of an application.

  • Utilizing Windows NT’s support for symmetric multiprocessing, DCOM applications can scale from small single-processor devices to massive multiprocessor systems.
  • As the demand for an application increases, even the most powerful multiprocessor system may be unable to keep up. DCOM’s locational flexibility makes it simple to disseminate components across multiple computers, making scaling easier and less expensive.
  • In addition to scaling with the number of users or the volume of transactions, applications also need to scale with the demand for new features. DCOM provides flexible mechanisms for client and component evolution. Clients can automatically query the component’s functionality. New clients can assess the existence of new interfaces and utilize them if they are present, or they can seamlessly transition to old interfaces.
  • Since functionality is divided into interfaces within the DCOM programming paradigm, you can create new clients that operate with old servers, fresh computers that work with old clients, or any combination, depending on your requirements. This further aids scalability.

5. High-bandwidth and low-latency networks

Distributed applications utilize a network to connect their components. This reduces network round trips whenever possible to avoid network latency effects. DCOM prefers the unconnected user datagram protocol (UDP) variant of the TCP/IP suite as its transport protocol. This protocol’s connectionless nature enables DCOM to carry out several optimizations.

Despite using connection-oriented protocols, DCOM offers major advantages against application-specific bespoke protocols. Additionally, DCOM employs a machine-specific keep-alive message. This implies that regardless of whether the client computer employs one hundred elements, a single ping transmission is sufficient to maintain all client connections. Along with consolidating all ping messages, DCOM reduces the total number of these messages by applying delta pinging, thereby reducing bandwidth consumption.

6. Applications that require security by default

DCOM can secure distributed applications without security-specific code or architecture on the client or component level.

    • DCOM obtains the current identity affiliated with the client’s current process whenever a client invokes an action or generates a new component instance.
    • Windows NT guarantees the authenticity of this user credential.
    • DCOM then transmits the username to the system or function executing the component.
    • DCOM on the configuration’s machine then revalidates the identity using the defined authentication mechanism and examines the component’s access control list.
    • If the client’s username doesn’t appear on this list, DCOM rejects the contact without involving the component.

This highly optimized preset safety feature is completely apparent to both the user and the component.

DCOM components may require different levels of encryption and authentication, while clients can prevent components from using their credentials when impersonating. DCOM lets you programmatically configure all of these mechanisms.

7. Fault-tolerant distributed application environments

Graceful failover and defect tolerance are essential for mission-critical, high-reliability applications. DCOM facilitates the execution of fault tolerance.

One strategy is the referral element. When clients discover the malfunction of a component, they reattach it with the initial referral component. The referral component is aware of which servers aren’t accessible and offers the client a version of the component operating on a different host.

Another strategy is commonly known as hot backup. Here, two instances of a certain server component process identical data in parallel on separate machines. DCOM components insert server code on the client side, and this manages defect tolerance.

See More: Simplifying Distributed Networks’ Security With SD-WAN, NaaS, and SASE

Takeaway

Today, DCOM is an essential part of Microsoft-based computing environments. Its ability to use remote procedure cons (RPCs) to enable communication between remotely situated app components is unique. Recently, the company started rolling out DCOM hardening updates to raise security levels and enforce authentication, protecting this key element from potential attacks.

Did this article help you understand how DCOM works? Tell us on FacebookOpens a new window , TwitterOpens a new window , and LinkedInOpens a new window . We’d love to hear from you!

Image Source: Shutterstock

MORE ON NETWORKSÂ