Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* X and DCE-RPC ? Please Help!
@ 1994-06-30 22:18 Ralf Suckow
  1994-07-06 11:08 ` Peter Klotz
  1994-07-06 18:47 ` Seiichi Tatsukawa
  0 siblings, 2 replies; 3+ messages in thread
From: Ralf Suckow @ 1994-06-30 22:18 UTC (permalink / raw)


Hi all,
please help me to resolve a question I need for a system
design while being not very familiar with X.

The short question is: how to integrate DCR-RPC into X processes?

Here's the long form:
(I'll try to give a bit more information,
since I very need an answer and it is very difficult to me
to find a solution by myself)

Is it possible to make an X (more precisely: Motif) application 
receiving X events to be a DCE-RPC client and/or server, 
i.e. to send and receive DCE remote procedure calls?

1. If we use a single-threaded process, how can we integrate
   the code of both systems that receives events and rpcs
   from a number of sockets, if we don't have access to the
   dce listening routines in the RPC runtime library?
   How can we make the process to receive asynchroneous
   X events while being in a synchroneous DCE-RPC
   (a number of little threads doing RPC)?

2. If we use a multi-threaded process, and we run two threads,
   one listening for DCE-RPC's, the other for X events,
   - how can we get the X software to use jacket routines
     for system calls (like select), and do we need to do this?
   - if both X and RPC-runtime use jacket routines for
     the receiving system calls, don't they possibly get 
     dead-locked in certain circumstances? Their algorithms
     are not synchronized to each other in the resource
     allocation orders etc.
   - can we access X-related data and libraries from outside
     the X thread, i.e. is it possible to make X (and Motif)
     thread-safe?

It would be very kind if anybody could help.
Only saying "Yes, it's possible, we did it" would
already be very useful since we can then get a decision
now and look for an implementation later.

Thank you very much.
Ralf
is there a thread-safe
   X implementation working with a DCE RPC-runtime using threads?
   (for HP-UX, for example)

-- 
Ralf Suckow, Berlin   |
suckow@contrib.de     | --- new signature still under construction ---


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: X and DCE-RPC ? Please Help!
  1994-06-30 22:18 X and DCE-RPC ? Please Help! Ralf Suckow
@ 1994-07-06 11:08 ` Peter Klotz
  1994-07-06 18:47 ` Seiichi Tatsukawa
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Klotz @ 1994-07-06 11:08 UTC (permalink / raw)


In article <2uvgc5$4i2@uropax.contrib.de>, suckow@uropax.contrib.de (Ralf Suckow) writes:
|> The short question is: how to integrate DCR-RPC into X processes?
Maybe it helps you if you have a look into issue 4 of the X Ressource a periodical
published journal about X you should find in almost all bookstores. There is
a longer article about using RPCs in general (ONC RPC not DCE RPC but this should
be not the problem) with X.

Hope this helps

Peter
-- 
+---+   +-------+  Internet: klotz@orgel.informatik.uni-stuttgart.de IIICCCOOO
 \   \  |    __  \   SubNet: klotz@ico.stgt.sub.org                   ICC OO OO
  \   \ |   <__>  |                                                  IIICCCOOO
   >   >|        /  DCE: /.../dce.ipvr.informatik.uni-stuttgart.de/user/klotz
  /   / |   +---+     X.500: @c=de@o=Uni Stuttgart@ou=Institut fuer Parallele
 /   /  |   |             und Verteilte Hoechstleistungsrechner@cn=Peter Klotz
+---+   +---+   ICONIX, in real life Peter Klotz


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: X and DCE-RPC ? Please Help!
  1994-06-30 22:18 X and DCE-RPC ? Please Help! Ralf Suckow
  1994-07-06 11:08 ` Peter Klotz
@ 1994-07-06 18:47 ` Seiichi Tatsukawa
  1 sibling, 0 replies; 3+ messages in thread
From: Seiichi Tatsukawa @ 1994-07-06 18:47 UTC (permalink / raw)


In article <2uvgc5$4i2@uropax.contrib.de> suckow@uropax.contrib.de (Ralf Suckow) writes:
>Is it possible to make an X (more precisely: Motif) application 
>receiving X events to be a DCE-RPC client and/or server, 
>i.e. to send and receive DCE remote procedure calls?

Yes, it is possible with some restrictions. For instance,
cdsbrowser shipped with HP DCE is a Motif application/DCE client.

>1. If we use a single-threaded process, how can we integrate
>   the code of both systems that receives events and rpcs
>   from a number of sockets, if we don't have access to the
>   dce listening routines in the RPC runtime library?
>   How can we make the process to receive asynchroneous
>   X events while being in a synchroneous DCE-RPC
>   (a number of little threads doing RPC)?

You can't have a single-threaded process because the RPC runtime
always creates a few threads.

>2. If we use a multi-threaded process, and we run two threads,
>   one listening for DCE-RPC's, the other for X events,
>   - how can we get the X software to use jacket routines
>     for system calls (like select), and do we need to do this?

If you are using DCE on top of the system's native Pthread,
probably select() is thread-aware and you don't need to do
anything.

If you are using DCE with CMA, you either rebuild the Xlib with
CMA headers, i.e., pthread.h, by yourself, or get the
thread-aware (CMA-integrated) libc from your DCE vendor. HP ships
the thread-aware reentrant libc with HP DCE. So does IBM, I
believe.

>   - if both X and RPC-runtime use jacket routines for
>     the receiving system calls, don't they possibly get 
>     dead-locked in certain circumstances? Their algorithms
>     are not synchronized to each other in the resource
>     allocation orders etc.

Probably, just using CMA wrappers is not enough. You'll need a
thread-aware reentrant libc. Otherwise, you'll end up doing
mutex_lock/unlock by yourself.

>   - can we access X-related data and libraries from outside
>     the X thread, i.e. is it possible to make X (and Motif)
>     thread-safe?

Of course, you can make X (and Motif) thread-safe by rewriting
the library codes. :-) Easier approach is to have a dedicated
thread making X (and Motif) calls and synchronize access to the
global data by using mutexes.

There is still a problem. The use of signal() by Xlib can
interfere the threads' use of signal handlers.

---  Seiichi
-- 

     + Seiichi Tatsukawa (^[$BN)@n@:0l^[(B) tatsu_s@ch.hp.com +
     +    Hewlett-Packard/Open Systems Software Division      +


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-07-06 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-06-30 22:18 X and DCE-RPC ? Please Help! Ralf Suckow
1994-07-06 11:08 ` Peter Klotz
1994-07-06 18:47 ` Seiichi Tatsukawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox