Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Inter process communication
@ 2002-05-13  8:50 Jakob Erber
  2002-05-14  5:20 ` Nikola Milutinovic
  0 siblings, 1 reply; 4+ messages in thread
From: Jakob Erber @ 2002-05-13  8:50 UTC (permalink / raw)


Hello,

which would be the mechanism of choice to perform the following task:

IPC between 2 processes on the same node, whereby
- block and noblocking read/write operations should be supported
- security is not an issue
- access must be thread safe (one com channel per thread)
- nice to have: resources are freed, if both com partners go away
- commication must be fast

What sould be used here?
- sockets
- Message Queue services (msg*)
- named pipes
- pipes
- ...

any hints are welcome

best regards

Jakob


--
What I publish in this group, is to be understood as my personal opninion
and must not be interpreted as a official statement of my company






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

* Re: Inter process communication
  2002-05-13  8:50 Inter process communication Jakob Erber
@ 2002-05-14  5:20 ` Nikola Milutinovic
  2002-05-14  6:21   ` Jakob Erber
  0 siblings, 1 reply; 4+ messages in thread
From: Nikola Milutinovic @ 2002-05-14  5:20 UTC (permalink / raw)


"Jakob Erber" <erberj@yahoo.de> wrote in message
news:3cdf7e4f$1@news.post.ch...
> Hello,
>
> which would be the mechanism of choice to perform the following task:
>
> IPC between 2 processes on the same node, whereby
> - block and noblocking read/write operations should be supported
> - security is not an issue
> - access must be thread safe (one com channel per thread)
> - nice to have: resources are freed, if both com partners go away
> - commication must be fast
>
> What sould be used here?
> - sockets
> - Message Queue services (msg*)
> - named pipes
> - pipes

All of above are per-process not per-thread. What does "one com channel per
thread" mean? Suppose one process has m threads and the other n threads.
You'd like m*n com channels? How would you identify the thread you want to
talk to?

I think there is a conceptual problem here.

If you are in multithreading domain, I'd opt sor sockets, since they can
easily be expanded to network, too.

Nix.




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

* Re: Inter process communication
  2002-05-14  5:20 ` Nikola Milutinovic
@ 2002-05-14  6:21   ` Jakob Erber
  2002-05-16  5:31     ` Nikola Milutinovic
  0 siblings, 1 reply; 4+ messages in thread
From: Jakob Erber @ 2002-05-14  6:21 UTC (permalink / raw)


Hello Nix,

thanks for your reply. Please see my answer below:

--
What I publish in this group, is to be understood as my personal opninion
and must not be interpreted as a official statement of my company


"Nikola Milutinovic" <Nikola.Milutinovic@ev.co.yu> schrieb im Newsbeitrag
news:abq7s0$d52$1@Mercury.ev.co.yu...
> "Jakob Erber" <erberj@yahoo.de> wrote in message
> news:3cdf7e4f$1@news.post.ch...
> > Hello,
> >
> > which would be the mechanism of choice to perform the following task:
> >
> > IPC between 2 processes on the same node, whereby
> > - block and noblocking read/write operations should be supported
> > - security is not an issue
> > - access must be thread safe (one com channel per thread)
> > - nice to have: resources are freed, if both com partners go away
> > - commication must be fast
> >
> > What sould be used here?
> > - sockets
> > - Message Queue services (msg*)
> > - named pipes
> > - pipes
>
> All of above are per-process not per-thread. What does "one com channel
per
> thread" mean? Suppose one process has m threads and the other n threads.
> You'd like m*n com channels? How would you identify the thread you want to
> talk to?

What we have is a multi threaded server process with n working threads,
which should spread the workload over n worker single threaded processes.
Each work thread should store the comm channel (msgq, socket, pipe ...) in
his own thread specific data. So each thread always contacts the same worker
process.


>
> I think there is a conceptual problem here.
>
> If you are in multithreading domain, I'd opt sor sockets, since they can
> easily be expanded to network, too.
>
> Nix.
>
>




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

* Re: Inter process communication
  2002-05-14  6:21   ` Jakob Erber
@ 2002-05-16  5:31     ` Nikola Milutinovic
  0 siblings, 0 replies; 4+ messages in thread
From: Nikola Milutinovic @ 2002-05-16  5:31 UTC (permalink / raw)


> What we have is a multi threaded server process with n working threads,
> which should spread the workload over n worker single threaded processes.
> Each work thread should store the comm channel (msgq, socket, pipe ...) in
> his own thread specific data. So each thread always contacts the same
worker
> process.

The way I've seen people using threads is:

- there is one (or more) process that is the SERVER
- server has multiple threads, one of them is LISTENER, others are WORKERS
- listener accepts requests and dispatches it to one of the workers
- there can be an additional thread, POOLER, which monitors the number of
free workers and creates/destroys them if need be

In this implemenatation, workers do not have comm channel information (and
really, they shouldn't). Each time there is a request, listener will take
it, re-package it (if need be) and hand it over to a worker thread. If you
opt for sockets, listener will pass the socket pointer to a worker and
continue to listen on the socket descriptor for the next request.

Nix.






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

end of thread, other threads:[~2002-05-16  5:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-13  8:50 Inter process communication Jakob Erber
2002-05-14  5:20 ` Nikola Milutinovic
2002-05-14  6:21   ` Jakob Erber
2002-05-16  5:31     ` Nikola Milutinovic

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