Board index » delphi » DCOM or Sockets ??? Which one would you choose ?

DCOM or Sockets ??? Which one would you choose ?

I have been working with COM quite a bit and really enjoy the power of it.

I have now started trying to use DCOM but I am finding so many pitfalls
along the way with security issues and just straight plain setup and
configuration problems (It seems so complicated to set up - especially if
one is doing a vertical market type deployment when one is personally not
able to do all the tweaks necessary to get DCOM up and running on clients
machines).

I have resolved to continue using COM for my ActiveX components and for my
LOCAL in-and-out-of-process severs - and to forget about remote DCOM. I have
been using SOCKETS and this has been so successful in my testing phase that
I am seriously thinking of using sockets to communicate between remote
machines from now on. There doesn't seem to be any worrying about OS
platform etc etc.

What you you all think ?? Is there anyone out there who is experiencing
these same issues and do you think SOCKETS are the way to go ??

Please could you give me some feedback (even if it's just a little comment)
if you foresee any pitfalls in doing this.

regards
shaun smith

 

Re:DCOM or Sockets ??? Which one would you choose ?


Quote
> I have now started trying to use DCOM but I am finding so many pitfalls
> along the way with security issues and just straight plain setup and
> configuration problems

You can configure it programatically and is not that big of a deal but yes,
sockets are much easier.

Quote
> What you you all think ?? Is there anyone out there who is experiencing
> these same issues and do you think SOCKETS are the way to go ??

They are an alternative. Depends how elegant you want your app (meaning you
may not want to parse strings or deal with buffers of bytes instead of
calling methods of an object) and how much time you want to invest in DCOM.
At the end it pays off, expecially if security is your concern.
*Avoid exes* and build Delphi ActiveX libraries. It becomes *much* easier
with MTS and you can forget about many worries.
That is my recommendation.
You can scale much better, have administration tools (remote and local) and
all sort of goodies...

That IMO is the way to go in many circumnstances (not in all thought).

Re:DCOM or Sockets ??? Which one would you choose ?


Thanks Alessandro

You say the DCOM configuration can be done programmatically - how ? (how
does one automatically call DCOMCNFG to install properly ?)

Also, I do NOT use MTS. I don't use any major database functionality as my
projects mainly deal with controlling external devices, with just a database
tagged on for historic recording and for logon and intial programme setup.
Do you think under these circumstances sockets would be better for sending
short commands to the remote PC to control the device?

Are there any major pitfalls (like over the internet etc) where I might find
myself in any problems in the future ?

Many thanks
shaun

Quote
Alessandro Federici <a...@bigfoot.com> wrote in message

news:97neq9$25v5@bornews.inprise.com...
Quote
> > I have now started trying to use DCOM but I am finding so many pitfalls
> > along the way with security issues and just straight plain setup and
> > configuration problems

> You can configure it programatically and is not that big of a deal but
yes,
> sockets are much easier.

> > What you you all think ?? Is there anyone out there who is experiencing
> > these same issues and do you think SOCKETS are the way to go ??

> They are an alternative. Depends how elegant you want your app (meaning
you
> may not want to parse strings or deal with buffers of bytes instead of
> calling methods of an object) and how much time you want to invest in
DCOM.
> At the end it pays off, expecially if security is your concern.
> *Avoid exes* and build Delphi ActiveX libraries. It becomes *much* easier
> with MTS and you can forget about many worries.
> That is my recommendation.
> You can scale much better, have administration tools (remote and local)
and
> all sort of goodies...

> That IMO is the way to go in many circumnstances (not in all thought).

Re:DCOM or Sockets ??? Which one would you choose ?


Quote
> You say the DCOM configuration can be done programmatically - how ? (how
> does one automatically call DCOMCNFG to install properly ?)

I haven't used DCOMCNFG (thank God) in more than a year thanks to MTS.
Checl "Professional DCOM Programming", Richard Grimes

Quote
> Also, I do NOT use MTS. I don't use any major database functionality as my
> projects mainly deal with controlling external devices, with just a
database
> tagged on for historic recording and for logon and intial programme setup.

So? MTS is no only for distributed transactions (as a matter of fact I
rarely use that).

Quote
> Do you think under these circumstances sockets would be better for sending
> short commands to the remote PC to control the device?

If this is your case, then sockets are fine but you are avioding a thing
that you better learn to become a better Windows developer.
Trust me, it's worth it.

Quote
> Are there any major pitfalls (like over the internet etc) where I might
find
> myself in any problems in the future ?

Not with sockets.
You may think of SOAP also.
Check my article at www.msdelphi.com and download my components at
codecentral.

Sorry for being so brief... (it's late and gotta got o work <G>)

Re:DCOM or Sockets ??? Which one would you choose ?


I have to totally agree with Alessandro. I haven't had to write COM exes
servers for over two years now. MTS is so easy to use, all your COM objects
just have to be in DLLs.

    -No more DCOMCNFG hassle.
    -It's scaleable
    -Object pool
    -And much more then I can mention here
If you have Win2000, COM+ makes it so easy.  Also, you don't have to create
objects that support the MTS interface.  You can use very simple COM
objects.  Even those simple COM objects can be transactional. COM+ takes
care of all the details.

Ross

Quote
"Alessandro Federici" <a...@bigfoot.com> wrote in message

news:97oefb$8ti11@bornews.inprise.com...
Quote
> > You say the DCOM configuration can be done programmatically - how ? (how
> > does one automatically call DCOMCNFG to install properly ?)

> I haven't used DCOMCNFG (thank God) in more than a year thanks to MTS.
> Checl "Professional DCOM Programming", Richard Grimes

> > Also, I do NOT use MTS. I don't use any major database functionality as
my
> > projects mainly deal with controlling external devices, with just a
> database
> > tagged on for historic recording and for logon and intial programme
setup.

> So? MTS is no only for distributed transactions (as a matter of fact I
> rarely use that).

> > Do you think under these circumstances sockets would be better for
sending
> > short commands to the remote PC to control the device?

> If this is your case, then sockets are fine but you are avioding a thing
> that you better learn to become a better Windows developer.
> Trust me, it's worth it.

> > Are there any major pitfalls (like over the internet etc) where I might
> find
> > myself in any problems in the future ?

> Not with sockets.
> You may think of SOAP also.
> Check my article at www.msdelphi.com and download my components at
> codecentral.

> Sorry for being so brief... (it's late and gotta got o work <G>)

Re:DCOM or Sockets ??? Which one would you choose ?


There is no object pooling in MTS. COM+ finally took the first step in this
direction.
--
Dan Miser
http://www.distribucon.com

Quote
"Ross Pellegrino" <r...@home.come> wrote in message news:3aa05c30_1@dnews...
> servers for over two years now. MTS is so easy to use, all your COM
objects
> just have to be in DLLs.

>     -No more DCOMCNFG hassle.
>     -It's scaleable
>     -Object pool

Re:DCOM or Sockets ??? Which one would you choose ?


Your right, MTS doesn't have object pooling. I meant to say that COM+ has
object pool. Most of my MTS work has been under the umbrella of COM+ where
MTS and Pooling are now fulling intergrated.

Ross
"Dan Miser (TeamB)" <dmi...@wi.rr.com> wrote in message
news:97q0ln$d076@bornews.inprise.com...

Quote
> There is no object pooling in MTS. COM+ finally took the first step in
this
> direction.
> --
> Dan Miser
> http://www.distribucon.com

> "Ross Pellegrino" <r...@home.come> wrote in message

news:3aa05c30_1@dnews...
Quote
> > servers for over two years now. MTS is so easy to use, all your COM
> objects
> > just have to be in DLLs.

> >     -No more DCOMCNFG hassle.
> >     -It's scaleable
> >     -Object pool

Re:DCOM or Sockets ??? Which one would you choose ?


HI

I've created an MTS/COM+ server that I run on win2kpro.  I tested a client
machine win98 and client app worked fine(just needed to install/register
either the TLB or DLL of the com object on the client).  Also this client
machine is on a LAN, although I did use the internet IP in my CreateRemote
call.  When an associate tried to run my client app on another win2kpro
machine over the internet he got an "interface not supported" error.  We
tried installing/registering TLB and/or COM DLL with no luck.  I also
created an install package (MSI) that COM+ built for me and installed on his
machine and still no go.  What could possibly be going wrong?  It doesn't
sound like a security issue, but even still I have "Enforce Access Checks"
unchecked.  Authentication Level was set at packet.

Help me if you can!

John

Quote
"Alessandro Federici" <a...@bigfoot.com> wrote in message

news:97oefb$8ti11@bornews.inprise.com...
Quote
> > You say the DCOM configuration can be done programmatically - how ? (how
> > does one automatically call DCOMCNFG to install properly ?)

> I haven't used DCOMCNFG (thank God) in more than a year thanks to MTS.
> Checl "Professional DCOM Programming", Richard Grimes

> > Also, I do NOT use MTS. I don't use any major database functionality as
my
> > projects mainly deal with controlling external devices, with just a
> database
> > tagged on for historic recording and for logon and intial programme
setup.

> So? MTS is no only for distributed transactions (as a matter of fact I
> rarely use that).

> > Do you think under these circumstances sockets would be better for
sending
> > short commands to the remote PC to control the device?

> If this is your case, then sockets are fine but you are avioding a thing
> that you better learn to become a better Windows developer.
> Trust me, it's worth it.

> > Are there any major pitfalls (like over the internet etc) where I might
> find
> > myself in any problems in the future ?

> Not with sockets.
> You may think of SOAP also.
> Check my article at www.msdelphi.com and download my components at
> codecentral.

> Sorry for being so brief... (it's late and gotta got o work <G>)

Re:DCOM or Sockets ??? Which one would you choose ?


Figure it out...it was security related...

Quote
"AutoCodeVB" <projectmana...@AutoCodeVB.com> wrote in message

news:9IFo6.24228$K63.295163@news1.rdc1.ab.home.com...
Quote
> HI

> I've created an MTS/COM+ server that I run on win2kpro.  I tested a client
> machine win98 and client app worked fine(just needed to install/register
> either the TLB or DLL of the com object on the client).  Also this client
> machine is on a LAN, although I did use the internet IP in my CreateRemote
> call.  When an associate tried to run my client app on another win2kpro
> machine over the internet he got an "interface not supported" error.  We
> tried installing/registering TLB and/or COM DLL with no luck.  I also
> created an install package (MSI) that COM+ built for me and installed on
his
> machine and still no go.  What could possibly be going wrong?  It doesn't
> sound like a security issue, but even still I have "Enforce Access Checks"
> unchecked.  Authentication Level was set at packet.

> Help me if you can!

> John

> "Alessandro Federici" <a...@bigfoot.com> wrote in message
> news:97oefb$8ti11@bornews.inprise.com...
> > > You say the DCOM configuration can be done programmatically - how ?
(how
> > > does one automatically call DCOMCNFG to install properly ?)

> > I haven't used DCOMCNFG (thank God) in more than a year thanks to MTS.
> > Checl "Professional DCOM Programming", Richard Grimes

> > > Also, I do NOT use MTS. I don't use any major database functionality
as
> my
> > > projects mainly deal with controlling external devices, with just a
> > database
> > > tagged on for historic recording and for logon and intial programme
> setup.

> > So? MTS is no only for distributed transactions (as a matter of fact I
> > rarely use that).

> > > Do you think under these circumstances sockets would be better for
> sending
> > > short commands to the remote PC to control the device?

> > If this is your case, then sockets are fine but you are avioding a thing
> > that you better learn to become a better Windows developer.
> > Trust me, it's worth it.

> > > Are there any major pitfalls (like over the internet etc) where I
might
> > find
> > > myself in any problems in the future ?

> > Not with sockets.
> > You may think of SOAP also.
> > Check my article at www.msdelphi.com and download my components at
> > codecentral.

> > Sorry for being so brief... (it's late and gotta got o work <G>)

Other Threads