Board index » cppbuilder » COM vs TCP Sockets

COM vs TCP Sockets


2005-03-30 07:31:01 AM
cppbuilder113
Can someone help enlighten me as to the pros and cons of both COM/DCOM vs
TCP Sockets and why one would use one over another?
I'm about to comnence developing an application to configure an application
service I wrote and am unsure as to which direction I should go. Although
this is my immediate need, I will be expanding into all sorts of things in
time to come and therefore am asking a much wider question than required so
I can get a better picture of what to expect in the other projects I will be
diving into.
Thanks
 
 

Re:COM vs TCP Sockets

COM ( Component Object Model)
In a simple sense, using OO, COM extends the source level OO classes into a
binary objects. You can look at COM objects as a C++ classes with defined
interfaces and operation methods and properties. Except, in the case of COM,
it is in a binary form.
The primary purpose for COM is binary reusability.
DCOM (Distributed COM)
DCOM is an extension of COM. This extension allows for multi-hosts
operability using, most likely, RPC (Remote Procedure Calls) to help in
marshaling(e.i, communication, parameter passing, return values, and etc...)
between multiple DCOM servers in multiple hosts.
SOCKET
SOCKET is only a communication layer. When we refer to socket, most often
time (though not 100% true but for now it is), we are refering to TCP/IP (a
protocol).
Socket can beused to implement many types of communication layers. Example,
in many cases, RPC are implemented using sockets.
How/When to use them?
Well, that all depends. Socket can by encapsulated as a COM/DCOM object to
facilitate reusability and ease of use. In fact, there are quite a few
socket objects in the internet you can download for your own use.
As for COM/DCOM, Windows loves these types of objects. Bill Gates loves them
even more. With that said, though MS is attempting to spread DCOM to UNIX
with DCOM on UINX, the whole technology is still pretty much Microsoft
solution to reusability. If your projects are Windows (Microsoft centric)
then you are probably better off with COM/DCOM. However, if the above is not
the case, you might want to explore additional technologies as well (SOAP,
OpenGL, CORBA, etc...) for portability).
I don't know if this help. But good luck.
Jeff www.ruamkwamkid.com
"Daniel Stevenson" < XXXX@XXXXX.COM >wrote in message
Quote
Can someone help enlighten me as to the pros and cons of both COM/DCOM vs
TCP Sockets and why one would use one over another?

I'm about to comnence developing an application to configure an
application
service I wrote and am unsure as to which direction I should go. Although
this is my immediate need, I will be expanding into all sorts of things in
time to come and therefore am asking a much wider question than required
so
I can get a better picture of what to expect in the other projects I will
be
diving into.

Thanks


 

Re:COM vs TCP Sockets

"Daniel Stevenson" < XXXX@XXXXX.COM >wrote:
Quote
Can someone help enlighten me as to the pros and cons of both COM/DCOM vs
TCP Sockets and why one would use one over another?

I'm about to comnence developing an application to configure an application
service I wrote and am unsure as to which direction I should go. Although
this is my immediate need, I will be expanding into all sorts of things in
time to come and therefore am asking a much wider question than required so
I can get a better picture of what to expect in the other projects I will be
diving into.
If it were me and the desire was to be as portable as possible, I
would distribute a lightweight HTTP server application along with the
service, and configure the service via the HTTP server. I would use
XML over HTTP for communications.
 

{smallsort}

Re:COM vs TCP Sockets

Quote
I'm about to comnence developing an application to configure an
application
service I wrote and am unsure as to which direction I should go. Although
this is my immediate need, I will be expanding into all sorts of things in
time to come and therefore am asking a much wider question than required
so
I can get a better picture of what to expect in the other projects I will
be
diving into.

COM/DCOM are very nice solutions if you are configuring your service from
the same machine or from a machine on the same network, but DCOM does NOT
play well through firewalls, so if you need to configure your app service
from the other side of a firewall, stick to sockets or HTTP.
Mark
 

Re:COM vs TCP Sockets

Thanks for everyone's input so far, please keep up the feedback as I'm
learning heaps.
"Mark Guerrieri" < XXXX@XXXXX.COM >wrote in message
Quote
>I'm about to comnence developing an application to configure an
application
>service I wrote and am unsure as to which direction I should go.
Although
>this is my immediate need, I will be expanding into all sorts of things
in
>time to come and therefore am asking a much wider question than required
so
>I can get a better picture of what to expect in the other projects I
will
be
>diving into.
>

COM/DCOM are very nice solutions if you are configuring your service from
the same machine or from a machine on the same network, but DCOM does NOT
play well through firewalls, so if you need to configure your app service
from the other side of a firewall, stick to sockets or HTTP.

Mark


 

Re:COM vs TCP Sockets

Isn't COM restricted to situations where both the Server and Client to be
running under Windows?
With your anticipation of "expanding into all sorts of things in time to
come" my preference would be TCP/IP.
Regards,
Bill
"Daniel Stevenson" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks for everyone's input so far, please keep up the feedback as I'm
learning heaps.