delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/10/18/08:26:51

From: adam AT appleby DOT com ("Adam Miller")
Subject: Re: linking with MSVC++
18 Oct 1996 08:26:51 -0700 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <9610181434.AA22227.cygnus.gnu-win32@smtp.appleby.com>
Mime-Version: 1.0
Original-To: <gnu-win32 AT cygnus DOT com>
X-Msmail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: owner-gnu-win32 AT cygnus DOT com


----------
> From: Jeff Bronte <jbronte AT doctord DOT com>
> 
> In the UNIX world of network programming this is often how it 
> is done. (I know you see a lot about sockets, but that is a dying
> method because of tracking addresses and hosts, RPC's offload
> you from this through a binding process, which becomes more important
> when you have several hosts and dozens of servers). Also, there is 
> a util called RPCGEN which greatly simplifies this type of development.
> 
> I'm not sure how any of this plays on Win95. Also, NT added RPC's
> because the industry demanded it, not because MS had any interest
> in provided the service (which allow UNIX and NT machines to 
> talk easily with each other, sockets are primitive). The MS
> version of RPC's (ONC compliant?) are supported in MFC on NT's,
> I have colleague's doing it now, but as with most MFC development,
> they are having difficulties getting it to work as well as the
> mature UNIX RPC's. Also, MS doesn't provide the powerful RPCGEN util,
> you have to do some lower level stuff.
>

RPCGEN is a utility provided with Sun's RPC implementation which is not
related in any way to the RPC implementation used in Win32.   The Win32
model 
is based on the DCE RPC model.  Although the Win32 RPCs are not function
call
equivalent (they have a different case semantics) they are functionally
equivalent.  There
are header files out there which will allow some DCE based code to compile
on Win32.
Win32 like DCE uses IDL files and compiler to generate the client and
server stubs for your
executable.  The  MS executable for IDL is MIDL.EXE and is supplied with
the Win32 SDK.

One area where MS lacks implementation compared to DCE is with CDS (Cell
Directory Service).
In DCE, the CDS allows for an RPC client to use implicit binding to a
server.  Since MS RPC does
not support the CDS, it does not support implicit binding only explicit
binding.  Also note that 
DCE is licensed by the OSF, and I don't know of any Unix implementations
that supply DCE with the OS.
There are also fully blown implementations of DCE for NT, I beleive DEC
supplies one.  DCE RPCs are 
not in the public domain.

There are some freeware/shareware implementations of Sun RPC for MS around,
since Sun RPC is
in the public domain.  Any NFS client or server software for NT needs to be
implemented using Sun RPCs,
since the NFS specification in based on Sun RPCs.

RPC programming is hit-or-miss.  That paradigm is not quite the panacea you
make it out to be.
RPCs are almost always synchronous, and I'm not sure if the SUN RPC model
is thread safe.  DCE
RPCs are thread safe, and the threading model used in DCE is the posix
thread model.  In my experience,
projects which require realtime distributed processing are not quite suited
for RPCs.  They're great for non-complex, stateless
operations like DB queries.  They are a disaster to use in a
Publish/Subscribe scenario used in Market Data applications.
For example, subscribe to all trades that occur in IBM.  An RPC client
would have to implement a polling scenario to
poll the server for queued updates.  Since a Market Data app would likely
want to see all trades as they happen without
skipping a tick, this paradigm would be quite unsuitable.

RPCs are very useful but not fitted for every paradigm.
 
> If you are doing professional development, you'll find this a very
> powerful way to modularize and distribute applications, even if
> on the same host. I am hoping that as GNU Win32 matures and more
> people want to play with the Win32 API, that this solution is 
> supported if not already. 
> 

If you want to see a wonderful framework for network programming that is
portable between Unix and Win32,
take a look at ACE (Adaptive Communcations Environment) in the public
domain, by Doug Schmidt editor
of the C++ Report.   It is a well designed C++ framework, written with the
idea of pattern development.
Although light in documentation, it's quite useful.  It is designed for
realtime distributed programming.

Adam Miller
Appleby Technologies Inc.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019