What Is a Distributed Component Object Model?
DCOM (Distributed Component Object Model) is a series of Microsoft concepts and program interfaces. Using this interface, client program objects can request server program objects from another computer on the network. DCOM is based on the Component Object Model (COM). COM provides a set of interfaces that allow communication between clients and servers on the same computer (running on Windows 95 or later).
- The Microsoft Distributed Component Object Model (DCOM) is an extension of the Component Object Model (COM). It supports communication between components on two different machines, regardless of whether they are running on a LAN,
- Microsoft's Distributed COM (DCOM) extends
- Distributing applications is not the end of the problem. Distributed applications introduce a whole new design and extension concept, which increases the complexity of software products, but brings considerable returns. Some applications are inherently distributed, such as multiplayer games, chat programs, and
- DCOM is
- When you start designing one on a real web
- In design and implementation
- Network connections are inherently more fragile than connections in the same machine. When a customer is no longer valid, especially when there are network or hardware errors,
- When the load increases, even if your budget supports you to buy the fastest multiprocessor, it may not be able to adapt to demand. DCOM's location independence provides a simple and cheap way to improve scalability by placing distributed components on other machines.
- For components that are stateless or do not need to share state with other components, reconfiguration is no easier task. For such components, multiple copies of them can be run on different machines. User load can be distributed equally to each machine, even considering the processing capacity of the machine and the load at the time. With DCOM, you can easily change the way the client process connects to components and between components. The same component can be dynamically reconfigured without additional changes or even recompilation. All that has to be done is to update the registry, file system, and database of the components involved.
- Example: An organization has offices in multiple locations, such as New York, London, San Francisco, and Washington, etc., which can install components to
- If the initial performance is not satisfactory, scalability will not bring much benefit. It is often helpful to consider that more and better hardware will make applications downward, but what are these requirements? Are these cutting-edge extensions useful? Does the support of every language from COBOL to assembly jeopardize the performance of the system? Does the ability to enable a component to run on the other side of the planet hinder performance when it is in the same process as the customer?
- In COM and DCOM, customers cannot see for themselves
- Most application-level protocols require some sort of management from start to finish. When the client has a serious hardware failure or the network connection between the client and the component has been interrupted for more than a certain period of time, the component should be notified in a timely manner.
- A common method to solve this problem is to send keep-alive messages for a period of time (Pinging). in case
- Using the network to distribute application systems is a challenge, not only because of the physical limitations of bandwidth and some potential problems, but also because it creates security issues such as those between customers, components, and between customers and components. Because many operations today can be accessed by anyone in the network, access to these operations should be restricted to a high level.
- If the distributed development platform does not provide security support, then every
- DCOM does not require any coding and design work on the client and components specifically for security.
- For some application systems, a component-level access control list is not enough, because some methods in a component can only be accessed by specific users.
- Example: A business settlement component can have a method to log in to a new
- There are two main issues that need to be addressed when designing an application system that works over the Internet.
- Even in the largest companies, the number of users on the Internet will increase by several orders of magnitude.
- End users want to use the same for all apps they use
- Fault tolerance is very important for mission-critical applications that require high reliability. The ability to recover from errors is usually achieved through a certain amount of hardware, operating systems, and software mechanisms for application systems.
- DCOM provides general support for fault tolerance at the protocol level. An advanced pinging mechanism described in the previous "Shared connection management between application systems" can detect network and client hardware errors. If the network can recover within the required time interval, DCOM can automatically re-establish the connection.
- DCOM makes it easy to achieve fault tolerance. One technique is the technique of the indicating component mentioned in the previous section. When the client process finds a component error, it reconnects to the indicated component that established the first connection. A message indicating which servers within a component are no longer valid and can provide a new instance of this component running on another machine. Of course, in this case, the application system still needs to handle error recovery at a high level (consistency and message loss issues, etc.).
- Because DCOM can place a component on the server side and the client side, the connection and reconnection of components and consistency issues can be completely transparent to users.
- Example: Microsoft's Transaction Server ("Viper") provides a general mechanism for handling consistency issues at the application level. Combining multiple method calls into an atomic transaction guarantees consistency and allows applications to easily avoid loss of information.
- Another technique is often referred to as "hot backup." Two copies of the same server component run in parallel on different machines, and they process the same information. The client process can explicitly connect the two machines at the same time. DCOM's "distributed components" make the above process completely transparent to user applications by placing service code that handles fault tolerance on the client. Another approach is to use a collaboration component running on another machine, which sends the customer request to those two server components on behalf of the customer.
- Attempting to transfer a server component to another machine when the error occurred proved to be a failure. The original version of the Windows NT group used this approach, but of course it can be done at the application level. DCOM's "distributed components" make it easier to accomplish this function, and it hides implementation details from the user.
- DCOM makes it easier to implement advanced fault tolerance techniques. Using DCOM's distributed component technology that runs part of the client process can make the details of the problem transparent to the user. Developers can enhance the fault tolerance of distributed application systems without changing client components or even reconfiguring the client.
Easy configuration with DCOM
- If it is not easy to install and manage, even the best application systems are useless. For distributed applications, being able to centrally manage and make the customer installation process as simple as possible is critical. At the same time, it is necessary to provide system administrators with the ability to discover potential errors as early as possible before they cause any damage.
- What technology does DCOM provide to make an application easier to manage?
- A common approach to simplify client installation can be summarized in the word "thin client", meaning that the fewer features that reside on the client, the fewer installation and maintenance issues that can occur.
- However, the thinner the client component, the lower the user-friendliness of the entire application, and the higher the demand on the network and server. Thin customers are not yet able to take full advantage of the powerful computing power available in today's desktop office systems. Because desktop production applications such as word processing software and spreadsheet software have unified and large features, most users The need for powerful computing power in such systems will not diminish. So implementing "thickness" at the right level is a very important decision for the design of distributed applications. DCOM promotes the balance between configuration simplicity and flexibility by letting developers and even administrators choose the location of each component. You can make the same transaction component (such as the data login check component) execute on the server and client by simple changes to the configuration. The application can dynamically select the user interface components (HTML generator on the server or ActiveX control on the client).
- One of the biggest issues with keeping "obese" customers is the issue of updating those customers to the latest version. With support for code downloads, Microsoft's Internet Explorer 3.0 now provides a very elegant solution to this problem. Whenever a user is browsing a page, Microsoft Internet Explorer checks the ActiveX controls used in the page and automatically updates them if necessary. Applications can also use this feature (ActiveX's CoCreateClassFromURL function) that is directly supported by Microsoft when they do not explicitly use the browser.
- In Windows NT 5.0, the concept of code download will be extended to the native COM class library. This type of library will use extended directories to store component configuration information and indexes into actual code, which changes the concept of local registration currently used. This class library will provide code repositories to the intranet (extended directory) and the Internet (code download, Internet path search) and make them completely transparent to existing applications.
- Installing and updating server components is usually not a serious issue. However, in a highly distributed application, it is generally impossible to update all customers at the same time. DCOM's robust versioning support, as described in the "Feature Development: Versioning" section in Part 1, allows the server to add new features while maintaining backward compatibility. The server component can handle both old and new client processes. Once all customers have been updated, the component can stop supporting features that are not needed by new customers.
- Using code download technology and its extension technology in the future, class libraries and administrators can effectively and safely centrally install and update customers, and can turn "obese" customers into smart customers without reducing too many functions. DCOM's support for robust versioning makes it possible to update server programs without first updating all clients.