I won't concentrate on how to write a DCOM program. I will write from a theoretical angle and try to provide a simple explanation of what DCOM actually is. If you are interested in trying some hands-on development, please refer to the excellent article called "DCOM D-Mystified: A DCOM Tutorial" by Brian C Hart on codeproject.com.
So, where were we?
COM objects are self-contained components that can be used in an application and provide a certain service. One can write a COM object and this object can be used via COM APIs. This functionality is extended by the DCOM – Distributed Component Object Model. DCOM allows the COM components to reside on different computers and be accessed by an application from distance.
Imagine complicated software that is using a lot of components to manipulate different tasks and actions – this software doesn't even have to be aware that the components it's using do not reside on the same machine it is running on because DCOM "hides" this headache from the user by providing it "location transparency" that eases the development of distributed applications.
DCOM communicate with distant objects through a remote procedure call protocol that is simply called RPC (maybe more on that in the future posts), handles the "low-level" details of the networking and allows the developer to concentrate solely on his program's functionality.
You can think of DCOM as a mechanism of inter-process communication (this is actually one of the uses of COM), but in a distributed environment. Neither the COM client, nor the COM server should be aware that they do not reside on the same machine and the client's questions as well as the server's answers are carried by the DCOM network protocol back and forth.
DCOM: COM Components on different machines (Source: MSDN)
You can meet DCOM in multiuser network games, chat applications, VoIP applications, network monitoring applications and many more. In the next post I'll dig a little deeper into the guts of the whole process and its exciting features and benefits.
That's all for now. Thanks for reading!
As always I'd like to share with you a tune that I keep listening to on and on during the last week. Enjoy!