Click to See Complete Forum and Search --> : Comments on using TCP/IP for IPC


T1000
September 17th, 2003, 10:58 PM
hi,

Recently, I have an idea of using TCP/IP (windows socket class and everything) to solve the Inter-Process Communication problem for my project. The modules that are on different processes are in the same machine and there are only a handful of these modules, but it needs a very fast, almost real time, communication amonst them. (updating test results)

What are your humble opinions regarding this in terms of :

Overheads induced?
Resource Usage?
Comparison to other well-known techniques?
Any other better advice?

thanks.

filthy_mcnasty
September 18th, 2003, 12:01 AM
if i remember correctly even winsock boils down to memory mapped files.

those would definately be your best choice as they have very little overhead that methods such as winsock have. in itself it should be fine and work fast enough though so if you have it working using sockets then why change? it's not THAT big of a performance hit if you designed it right.

Mick
September 18th, 2003, 12:08 AM
Use LPC if you wanna be fast :) it's undocumented mostly, but you can find it on a google search....

here are some of the calls, these are kernel mode (driver) so replace Zw with Nt..

ZwRequestWaitReplyPort()
ZwConnectPort()

whoops here's my user mode code to create the port:

NtCreatePort()

dimm_coder
September 18th, 2003, 02:30 AM
It depends, of the IPC U need to get. May be it will be enough to have IPC based on memory-mapped file + some type of synchronization for accessing it on writting. It is usually enough for sharing data between processes.

__________
Well, what someone could wait from Mick, of course, "Hey guy, use those undocumented functions to be the fasterst and get some additional points to yours' carma :p " . Of course, this is the good advice until those undocumented functions will be changed by kind guys from M$ to other undocumented functions in the next Windoze version.

Mick
September 18th, 2003, 02:46 AM
Originally posted by dimm_coder
It depends, of the IPC U need to get. May be it will be enough to have IPC based on memory-mapped file + some type of synchronization for accessing it on writting. It is usually enough for sharing data between processes.

__________
Well, what someone could wait from Mick, of course, "Hey guy, use those undocumented functions to be the fasterst and get some additional points to yours' carma :p " . Of course, this is the good advice until those undocumented functions will be changed by kind guys from M$ to other undocumented functions in the next Windoze version.

when you realize that LPC is used by M$ in almost all calls in the win32 subsystem, then you'll be a god like me....so be a god, and know what your talking about :)

Mick
September 18th, 2003, 02:48 AM
and it's Karma with a K...love you there big fella :)

Mick
September 18th, 2003, 02:54 AM
I see you there dimm, i"m lurking but I see you...

I'll give you some advice...

don't mess with the bull or you'll get the horns...

Gal knows what I'm talking about, don't you gal... :) :) :)

dimm_coder
September 18th, 2003, 03:18 AM
Originally posted by Mick_2002
when you realize that LPC is used by M$ in almost all calls in the win32 subsystem, then you'll be a god like me....so be a god, and know what your talking about :)

Well, I have pointed out about using undocumented functions at all. Nevertheless, when I had been programming for Windoze, I had been using some of them from time to time. And Yeh, I know that LPC is widely used for system calls realization in win32 subsystem . I'm enough educated in OS design and I'm interested in OS theory :) I donot work with Winodoze now, but still remember its design enough well.
And welllll, I just wanted to play a trick on you, because I've missed about U Mickey ;):p

Karma :p Thanks Mickey... Now my Karma will be OK!

Mick
September 18th, 2003, 03:30 AM
Originally posted by dimm_coder
Well, I have pointed out about using undocumented functions at all. Nevertheless, when I had been programming for Windoze, I had been using some of them from time to time. And Yeh, I know that LPC is widely used for system calls realization in win32 subsystem . I'm enough educated in OS design and I'm interested in OS theory :) I donot work with Winodoze now, but still remember its design enough well.
And welllll, I just wanted to play a trick on you, because I've missed about U Mickey ;):p

Karma :p Thanks Mickey... Now my Karma will be OK!

Like I said..don't mess with the bull :) I still love you dimm :) :) :) your in my little list of smart guys...if I ever win the lottery, your one of the guys I'm calling for my new company :) along with paul M, andy, gabe(maybe you farker), rxbegin or whatever his farking name is, gal of course, sam just so I can tell him to shut the fark up...did I miss someone???

dimm_coder
September 18th, 2003, 03:58 AM
Originally posted by Mick_2002
Like I said..don't mess with the bull :) I still love you dimm :) :) :) your in my little list of smart guys...if I ever win the lottery, your one of the guys I'm calling for my new company :) along with paul M, andy, gabe(maybe you farker), rxbegin or whatever his farking name is, gal of course, sam just so I can tell him to shut the fark up...did I miss someone???

Hey, Mickey, go and buy a lottery ticket this everning... ;) I know , U will carry today :p

and fark I 'm busy today so I cannot give a quick reply... In those moments I understand, how it is difficult to be a multitasking OS with only one CPU :)

Mick
September 18th, 2003, 04:25 AM
Originally posted by dimm_coder
Hey, Mickey, go and buy a lottery ticket this everning... ;) I know , U will carry today :p

and fark I 'm busy today so I cannot give a quick reply... In those moments I understand, how it is difficult to be a multitasking OS with only one CPU :)

I have to put a fan on my cpu, cause you know I'm burning it at both ends :)