- socketpro.zip
- netdemo
- bin
- DNSResolver.exe
- GetHtml.exe
- IONet.exe
- MultipleSvs.exe
- MultiSvs.exe
- MultiSvsClient.exe
- NetBaseR.dll
- SafeSocket.exe
- SecureSocket.exe
- SpeedTest.exe
- ClientComponents
- ClientSocket.dll
- DResolver.dll
- SBroker.dll
- SockFile.dll
- help
- include
- lib
- NetBaseR.lib
- MultiSvsSample
- Samples
- client
- DnsSvs
- GetHTML
- InternetIO
- MultiSvsSample
- SecureSocket
- SpeedTest
- DResolver
- Svr
- SvrComponents
- MultipleSvs.exe
- MultiSvs.exe
- NetBaseR.dll
- SafeSocket.exe
- trash
|
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>Offset weaknesses of DCOM with strong points of socket</title>
</head>
<body>
<h3 align="center"><strong>Offset weaknesses of DCOM with strong points of socket</strong></h3>
<ol>
<li>Introduction<br>
A few years ago when using DCOM to write simple
distributed applications, I was fascinated with DCOM. However, I started to doubt this
technology soon, and was gradually disappointed with it. Recently, I have time to work
with socket. After diagnosing DCOM net data communication with net tools, and comparing it
with socket, I found that DCOM kills efficiency of TCP/IP net data communication and DCOM
net data communication is very inefficient. Here is the <a
href="http://www.codeproject.com/useritems/SockFundamental.asp">recommended article</a>
for you to read. Additionally, I also put two samples, <a
href="http://www.codeproject.com/useritems/STutorial1.asp">socket development guide</a>
and speed test to let you test it. MS highly recommends us three-tier development and
pushing all (or as many as possible) of logical operations in the middle tier. After
reading these articles, you will understand the essence of this recommedation more deeply.
The essence of this recommendation is to avoid bad DCOM net data traffic between a client
and a server over internet/intranet.<br>
You maybe disagree with me, and say that my
DCOM client-server application system works well to me. That is true only if a limited
number of clients are connected to your DCOM server. That will be false if a large number
of clients are involved. In this article, I will show you with a sample how to offset
weaknesses of DCOM with socket for improving your DCOM server application performance a
lot. <br>
</li>
<li>Weaknesses of DCOM<br>
What are weaknesses of DCOM? Here is a list of
weaknesses of DCOM.<ul>
<li>Net efficiency is very low.</li>
<li>DCOM calls are synchronous only, and can not be asynchronous. Connection points are
faked asynchronous calls. This weakness complicates client side development in many cases.
In order to solve lengthy calls problem, your DCOM clients will have to use threads to
prevent client graphical user interfaces from being frozen. Threads will certainly hurt
you if your application becomes large and complicate.</li>
<li>You client applications never batch multiple calls into one. Lost of net data
round-trips are involved.</li>
<li>Many others like slow initialization server object and security setup etc.<br>
</li>
</ul>
</li>
<li>A perfect solution to DCOM with socket<br>
What advantages does socket have? If you read
the above recommended articles, you will know the following advantages with socket.<ul>
<li>Net efficieny is better. If lots of calls are involved, socket net efficiency is much
better than DCOM.</li>
<li>Socket supports both synchronous and asynchronous calls. This feature definitely
simplify your client application development a lot. You will have much less chance to use
worker threads to prevent client graphical user interfaces from being frozen.</li>
<li>Your client applications could easily batch multiple calls into one with less code or
without any code. Lost of net data round-trips are avoided.</li>
<li>Your client applications can run multiple socket connections to a server. Each of the
connections run independently and in parallel without creating any worker threads. You can
use different socket sessions to process different calls at the same time.</li>
</ul>
<p> What disadvantages does socket have? Here is
the list of socket disadvantages.<ul>
<li>It is difficult to program server side applications because of multiple threads problem.
</li>
<li>You must handle socket security.</li>
</ul>
<p> I already solve all of the above two socket
problems for you. See the above articles. Attached with this exmple, you will find a
socket-nized DCOM server with full C++ source code. Additionally you will see a VB client
application with source code. It demonstrate the advantages of combination of socket and
DCOM. It uses strong points of DCOM to offset socket weakness (security) in window
platforms, and also uses strong points of socket to offset weaknesses of DCOM too. No
hacker is able to directly hack this application socket communication unless the hacker
hacks window DCOM system first. </p>
</li>
<li>Notes<br>
No matter whether you like this article, I
welcome to your comments. I am excited with this. Attention: I am also able to provide
service to your company. Contact me at <a href="mailto:yekerui@yahoo.com">yekerui@yahoo.com</a>.</li>
</ol>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Yuancai (Charlie) Ye, an experienced C/C++ software engineer, lives in Atlanta, Georgia. He is an expert at continuous inline request/result batching, real-time stream processing, asynchronous data transferring and parallel computation for the best communication throughput and latency. He has been working at SocketPro (https://github.com/udaparts/socketpro) for more than fifteen years.