From: gjb@fig.citib.com (Greg Brail)
Subject: Re: DCE questions
Date: Fri, 13 Aug 1993 15:01:07 GMT [thread overview]
Message-ID: <CBpDpv.H2q@fig.citib.com> (raw)
In-Reply-To: 2361@ncrsecp.Copenhagen.NCR.COM
In article <2361@ncrsecp.Copenhagen.NCR.COM> pio@ncrsecp.Copenhagen.NCR.COM (Per Igel) writes:
As I understand it, you want to use DCE to pass untyped streams of
bytes. The server will recieve them and spit them back again.
Unless your "scheduler" does something fun like set priorities and
stuff, all you really need to do is write a server that accepts
incoming RPCs with variable-length byte arrays in them, then calls
RPCs that send them on their way. Each RPC will be transparently
handled in a separate thread. The whole thing should take about 30
lines of code.
Even if it's more complicated than this, I can't see what purpose DCE
serves in this project, unless the point is to use it for the sake of
using it. If you avoid security, naming, and even data marshalling,
you might as well just use streams or sockets. Sadly, I see lots of
people used to programming in the "message passing" style who learn
about DCE, than start trying to use it to pass around those same
untyped streams of bytes.
>Initially the scheduler process will setup a signal handling routine for
>SIGPOLL and create a number of TLI endpoint/connections (to the servers it
>wants to connect to), then reads (blocks on) the incoming request queue (IRQ).
Your implementation of DCE may not let you catch SIGPOLL. Transarc DCE
for Solaris 1.1 (SunOS 4.1.3), for instance, won't let you do this.
DCE vendors usually re-implement the standard libraries in a
thread-safe manner. If you're lucky, your vendor re-implemented
whatever standard library functions and system calls you need to work
in a multithreaded environment. For instance, it'll let you call
"write" in several different threads using the same file descriptor
without causing too much havoc. However, lots of signals (like SIGPOLL
and SIGIO) are usually unavailable to users for this reason.
>I think the basic questions regarding this pilot project boils down to:
> - DCE-RPC is extremely synchronous, therefore, the only way to make it
> "asynchronous" is to create a thread for each RPC call you send of
> or for each RPC call or each "connection", because you could do
> something like regarding bindings as having the same function as
> TLI file descriptors. Or are there asynchronous RPC's in DCE RPC as
> there is in Sun RPC?
The "maybe" qualifier, possibly combined with "idempotent", makes the
RPC asynchronous. You can't return anything from the RPC, you don't
have to wait for it to complete, and you have no way of knowing
whether or not it worked.
> - when I make the scheduler process both a client and a server then
> I need to kick off the "rpc_server_listen" call in a separate thread
> (for the server part), right? Now that I have a "server"-thread and
> a several client threads is there a point where my process runs out
> of threads?? Is 'rpc_c_listen_max_calls_default' that max limit or
> what? And what if that happens how do I solve this?
Spawn a thread to run the "rest" of your program, then call
"rpc_server_listen" in the main thread. I've been told DCE gets
unhappy on some platforms when you don't do it this way. If the
maximum number of threads is busy, incoming calls go into a queue. If
that fills up, RPCs fail with a communications error.
greg
--
Greg Brail ------------------ Citibank -------------------- gjb@fig.citib.com
next prev parent reply other threads:[~1993-08-13 15:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-12 15:25 DCE questions Per Igel
1993-08-12 19:47 ` Rich Salz
1993-08-13 15:01 ` Greg Brail [this message]
-- strict thread matches above, loose matches on Subject: below --
1994-01-20 13:32 DCE Questions Jaqui Lynch
1994-01-21 13:53 ` Mark Hickey
1994-01-21 14:23 ` Craig Weeks
1994-01-21 19:12 ` Wanda Monroe
1994-01-31 16:55 Shridhar R Muppidi
1994-02-01 9:42 ` Bernd Dreier
1994-02-01 12:45 ` Jon Mauney
1994-02-01 18:13 ` Ted W. Larson
[not found] ` <2itvfm$77t@ftn.ftn.us-ny.citicorp.com>
1994-02-06 12:33 ` Manfred Scheible
1994-02-03 21:46 ` Reilly F. Hayes
1994-02-09 16:23 ` Jamison H Abbott
1994-02-10 17:41 ` Seiichi Tatsukawa
1994-02-08 17:04 ` Rich Salz
1994-10-21 5:22 Carl Hoang
1994-10-24 22:42 ` Gerry Palo
1994-10-26 0:18 ` Dr. James W. Hong
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox