LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-03-2012, 03:06 AM   #1
ebinjose
LQ Newbie
 
Registered: Jan 2008
Posts: 14

Rep: Reputation: 0
How to communicate between a daemon and an application [IPC]


Hi,

I have 2 binaries part of our project.
Let me call it "Daemon" and "Consumer". Both binaries would start running when the project starts up.

I need to communicate to/from "Daemon" and "Consumer" [I need send a few messages to and fro periodically]. I need to implement this IPC in the most independent and generic way so that we can reuse this code in later projects.

I was thinking of using named pipes. The only freedom that I don't have is both the "Daemon" and "Consumer" should know the "name" of the pipe, so its kind of tied and not very independent.

To my knowledge its not possible to use API's to communicate between 2 binaries/applications.

Is there a better way of communicating in a more generic and independent way?

Thanks in advance.
Ebin
 
Old 07-03-2012, 05:30 AM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,495

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Take your pick:
  • Shared Memory
  • Pipes
  • Sockets
  • Message Queue
 
  


Reply

Tags
daemon, ipc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Application/Daemon is responsible for opening ... theKbStockpiler Linux - General 7 03-19-2012 08:33 PM
Configure an application to run as a daemon in Fedora 12 Ness_Wiggin Linux - Server 2 11-29-2009 11:50 PM
How to communicate C application with Java waqasdaar Programming 2 01-31-2009 11:50 PM
Looking for efficient way to communicate between application on parallel system aw_wolfe Programming 3 01-24-2006 09:19 AM
How To Program Daemon(Service) Application wlmapp3 Programming 6 07-23-2003 03:58 PM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration