473,748 Members | 7,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2165
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*****@cpacke r.org> wrote in message
news:f8******** *************** ***@posting.goo gle.com...

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.programmin g might be suitable, but I suspect you have already
selected the optimum newsgroup in c.u.p. F'ups set.

--
Chuck F (cb********@yah oo.com) (cb********@wor ldnet.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
400
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 technique to use for interprocess communications in this situation? Thanks in advance, Jeroen
7
442
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 application and more. Now i'm doing it by sending API WM_COPYDATA messages with SendMessage. Our users are identified by a Guid and getting the app user by sending four WM_COPYDATA with kind a "GiveMeUserGuidPart0of4" and putting to gether the 4...
2
5138
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 this kind of communication in a secure way (protected from sniffing)? It would be a very simple protocol. Question, and two possible answers 'yes' or 'no'.
3
4799
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 of the internet, but have not found sufficient to answer my questions. Suppose that I am writing a ray tracer in Python. Well, perhaps not a ray tracer. Suppose that I am writing a ray tracer that has to update sixty times a second (Ignore...
7
2053
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 works if multiple users use the machine at the same time so that one user has no access to the communication of programs of another user. Normally any user could connect to an open socket on a machine
4
2081
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 supposed to be written in MFC(Visual C++) or Win32 GUI Application. The problem is to communicate data between the two applications. for example,
0
1489
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 synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their stdout and stderr. The problem is that, for some external programs that I launch inside my interface, I am not able to capture and display the...
2
1788
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 synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their stdout and stderr. The problem is that, for some external programs that I launch inside my interface, I am not able to capture and display the...
3
4090
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 using ConnectNamedPipe() function and then reading the file created on the file at one end. But I am bit curious about the how the process/user at the other end of the pipe will communicate with the my terminal.How the things goes in the...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.