473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Interprocess communication: which scenario?

I need to do the following simple interprocess communication (IPC) among these
processes that are all on the same box:
-- A daemon waits for "I'm here" announcements from multiple clients
-- One or more clients send an "I'm here" to the daemon upon command
via the client's GUI (Each client's GUI is viewed by a different
human user)
The daemon retransmits "X is here" to all clients when it receives any "I'm here".

I read some tutorials on message queues and sockets and have tried their examples,
but that's the extent of my experience in this area. Since I'm going to have
to invest a significant amount of time learning molecular-level trivia about
IPC to implement the application in C, I'd like some opinions as to which IPC
scenario -- sockets, message queues, etc. is most appropriate for my application
model.
Nov 14 '05 #1
4 2145
Charles Packer wrote:
I need to do the following simple interprocess communication (IPC) among these processes that are all on the same box:
Ok
-- A daemon waits for "I'm here" announcements from multiple clients Daemon may listen socket/pipe for these messages -- One or more clients send an "I'm here" to the daemon upon command via the client's GUI (Each client's GUI is viewed by a different
human user) These clients will send this message to server's socket/pipe The daemon retransmits "X is here" to all clients when it receives any "I'm here".
The server can do it by using multicast notifications
I read some tutorials on message queues and sockets and have tried their examples, but that's the extent of my experience in this area. Since I'm going to have to invest a significant amount of time learning molecular-level trivia about IPC to implement the application in C, I'd like some opinions as to which IPC scenario -- sockets, message queues, etc. is most appropriate for my application model.


There is one of many opinios :-)

Nov 14 '05 #2

"Charles Packer" <ma*****@cpacker.org> wrote in message
news:f8**************************@posting.google.c om...

First off, this is *off* topic on this ng. Having said that (to appease ye
daemons of c.l.c.)
I need to do the following simple interprocess communication (IPC) among these processes that are all on the same box: ^^^^^^^^^^^ -- A daemon waits for "I'm here" announcements from multiple clients -- One or more clients send an "I'm here" to the daemon upon command
via the client's GUI (Each client's GUI is viewed by a different
human user) The daemon retransmits "X is here" to all clients when it receives any "I'm here".

Ok.
I read some tutorials on message queues and sockets and have tried their examples, but that's the extent of my experience in this area. Since I'm going to have to invest a significant amount of time learning molecular-level trivia about IPC to implement the application in C, I'd like some opinions as to which IPC scenario -- sockets, message queues, etc. is most appropriate for my application model.


Since all your processes are on the same box, i'd suggest a named pipe. They
are the
simplest method of IPC I know of yet are very usable. If you supply the
server and all
the clients with some unique id, you only need 2 pipes (they are
half-duplex), since writes
to pipes are guaranteed to be atomic (POSIX). Furthermore, they are
supported over a
range of OS's.

See
http://developers.sun.com/solaris/ar...med_pipes.html
http://librenix.com/?inode=4423

Nov 14 '05 #3
Charles Packer wrote:

I need to do the following simple interprocess communication (IPC)
among these processes that are all on the same box:
-- A daemon waits for "I'm here" announcements from multiple clients
-- One or more clients send an "I'm here" to the daemon upon command
via the client's GUI (Each client's GUI is viewed by a different
human user)
The daemon retransmits "X is here" to all clients when it receives
any "I'm here".

I read some tutorials on message queues and sockets and have tried
their examples, but that's the extent of my experience in this area.
Since I'm going to have to invest a significant amount of time
learning molecular-level trivia about IPC to implement the application
in C, I'd like some opinions as to which IPC scenario -- sockets,
message queues, etc. is most appropriate for my application model.


Those things are all system specific extensions to the C language,
and thus are off topic on c.l.c. where discussion is limited to
things defined by the various ISO C standards. In some respects
comp.programming might be suitable, but I suspect you have already
selected the optimum newsgroup in c.u.p. F'ups set.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeroen | last post by:
Question, We are in the process of creating a windows service in C#. Another GUI application, also written in C# has to communicate from another machine to this service. What is the best...
7
by: Daniel | last post by:
I search for a good way to communicate between processes. I have a main application(might be more instances) and an tool that should exchange information such as which user is logged in into the...
2
by: Leonardo D'Ippolito | last post by:
Hi! I have two .NET win apps that need to communicate on a TCP/IP network. 'App A' must ask 'app B' if it's allowed to do some task, and 'app B' must authorize or prohibit it. How can I do...
3
by: James Aguilar | last post by:
Oh wise readers of comp.lang.python, Lend a newbie your ears. I have read several old articles from this group about memory mapping and interprocess communication and have Googled the sh** out...
7
by: Michael Butscher | last post by:
Hi, this is not really Python-specific but I need it for Python. I'm wanting a method for interprocess communication which is OS- independent (sockets would be the normal way to go), but which...
4
by: batista | last post by:
Hello all, I need suggestions and possibly solutions to the problem stated below: I have an application written purely in .NET ( Windows Form Application) and another application that is...
0
by: Murali | last post by:
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application...
2
by: Murali | last post by:
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application...
3
by: madankarmukta | last post by:
Hi all, I am very new to Implementation of the Interprocess communication.I am trying to implement the concept in c++.I created the pipe using Createnamedpipe() function ,connecting to that pipe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.