LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2008, 05:14 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Rep: Reputation: 32
easy question.....


Hello,

I would like to connect two process, but I have a doubt.
What is the best option??? Pipes or shared memory. If there is other way to do it, I do not known it.

If I want to connect two process in different machines, I suppose the best option to connect it is socket, right???

Best regards
 
Old 09-23-2008, 06:53 AM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
I think you can connect such using ssh and a named pipe or fifo.

But I've never done it myself.
 
Old 09-23-2008, 07:09 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
It probably depends too on who made those programs - if you're the one who creates them, you can decide the best way that fits the situation (in this case sockets are handy, but not the only alternative -- and therefore not necessarily the best). On the other hand if you have no way of modifying the programs, you don't have as many options - for example you can probably pipe data from one process to the other, but can't implement socket functionality into them if they don't already have it (at least without wrapping them into a program that does it).

Define the situation more clearly; what sort of "processes" are they, made by who, what information they should be able to exchange and so on.
 
Old 09-23-2008, 07:17 AM   #4
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
There are many other ways to do it. Just to name a few: SOAP, RPC, CORBA, DBUS, RMI, MQ, CTS, mails, ... and I can go on and on and on forever...

Last edited by Agrouf; 09-23-2008 at 07:19 AM.
 
Old 09-24-2008, 02:50 AM   #5
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Original Poster
Rep: Reputation: 32
in a few words, I am interesting in exchange data beteewn two applications.
Example: I have developed a programm, and now I would like to watch some vars of programm WITHOUT stop it. Then, I develop a new program only to watch the value of some vars, and modify its value if I want.

I do it in the same computer with shared memory, easy programm, but I do not known if is the best option.
And Later, I would like to do the same, but in differents computers.

I hope this explanation define the situation more clearly.

Best regards.
 
Old 09-24-2008, 02:56 AM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
which language and which technologies? Are you already using something like QT or gtk?
 
Old 09-24-2008, 04:00 AM   #7
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Agrouf View Post
which language and which technologies? Are you already using something like QT or gtk?
Hello,
I use a Geode, and lenguague I use C programm with some threads and QT application to watch vars of C programm.

Best regards
 
Old 09-24-2008, 04:27 AM   #8
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
You could use the QT network library, or file streams or sockets or RPC or something else, depending on how much time you want to spend, how maintainable you want your code to be, how easy you want it to administer, how slow your network is, how much volume of information is needed, and what you feel more at ease with.

Last edited by Agrouf; 09-24-2008 at 04:29 AM.
 
Old 09-24-2008, 06:23 AM   #9
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Agrouf View Post
You could use the QT network library, or file streams or sockets or RPC or something else, depending on how much time you want to spend, how maintainable you want your code to be, how easy you want it to administer, how slow your network is, how much volume of information is needed, and what you feel more at ease with.
Hello,

Thank you very much. OK, I see, I need read more.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Question, Does anybody Know? Mistro116@yahoo.com Programming 8 11-07-2005 10:31 AM
easy question! =P h0bbit Linux - Newbie 2 07-07-2002 05:10 AM
less easy question 5amYan *BSD 4 04-25-2002 05:52 PM
easy question 5amYan *BSD 4 04-25-2002 04:09 AM
An Easy Question southernman Linux - General 1 12-12-2001 06:41 PM


All times are GMT -5. The time now is 03:26 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration