LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 11-22-2010, 11:19 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Rep: Reputation: 32
Communication data between different process.


Hello,

I would like to send struct data from process A to process B but I dont known what is the best way.
I have read about IPC, but there are a lot of ways to do it.
My question is: what is the best way to do it?
pipes?, shared memory?, sockets? etc etc.

Best regards.
 
Old 11-22-2010, 11:33 AM   #2
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
Something you'll have to experiment with. When it comes to linux, it's usually a "preference" thing - most systems have more than enough memory to tolerate communication through a bsd sockets interface. Nowadays, your biggest concern is really how to do the serialization / de-serialization, which does have some implication on how your software will interface.

Just as an example, at work we have multiple software daemons which interface in different ways. Some use posix mqueues, some use tcp, udp, and raw sockets. Some use shared memory. Most are a mix of a few different ways, depending on the component and it's author.
 
Old 11-22-2010, 01:23 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
There is no "best way"

Strong suggestion: read Beej's Guide to IPC. Short; EXTREMELY informative:

http://beej.us/guide/bgipc/
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
process communication andyar85 Programming 4 01-13-2008 07:02 PM
inter process communication aral Programming 5 08-03-2006 01:37 PM
how to do one to many inter process communication? Thinking Programming 2 12-14-2005 03:54 AM
Process Communication erdemilhan Programming 1 11-27-2004 04:06 PM
process communication between linux and xp naanu Linux - Networking 2 03-10-2004 12:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration