Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fork vs. Message queues

Status
Not open for further replies.

raisin96

Programmer
Oct 10, 2002
21
US
Hi,

Which is better, creating child processes through fork or using the Unix message queues???.... I'm developing under an Unix AIX system.... My program will be connected to different Bank Branches and process the transactions coming in...for now i'm using the fork function to create child process to handle each transaction coming in...but somebody told me that it is better to put the messages that came in to the message queue of Unix..and have another program read that queue and process the messages in it....

Thank in advance.
 
i also prefer ipcs, shmem and semaphores,
a) differents exec can work on it
b) there are situations you will keep the data
after exit
is 'raisin' french ? vox clamantis in deserto.
 
If fork() is really expensive for your app, you do
have the option of starting n instances and then using
a transaction concentration procedure to connect the
request with available processes via message queue
IPC.
Message queues are not really simple though...and
the complexity may not be what you want...
 
Thanks to all. :)

to jamisar-> sorry, i'm not familiar if 'raisin' is french or not...:)
 
hi ..

why not try threads ?
anyway from personal use, message queues by far are the easiest [we at nokia use it quite a lot].

for asynchronous messaging, i would suggest you try implementing whatever you are trying to do using message queues.

fork() is good -> but a pain in the *&^(*^

br:
 
Status
Not open for further replies.

Similar threads

  • Locked
  • Question
Replies
1
Views
64
  • Locked
  • Question
Replies
2
Views
70
  • Locked
  • Question
Replies
4
Views
72
Replies
3
Views
79

Part and Inventory Search

Sponsor

Back
Top