Re: Fast Multiple Application Comunication
- From: "Greg Young" <DruckDruckGoose@xxxxxxxxxxx>
- Date: Fri, 12 May 2006 06:29:58 -0400
You seem to have left out shared memory which would be the fastest solution
if you are running on the same machine. Here is a simple wrapper that may
help you out a bit http://addressof.com/blog/archive/2003/05/01/164.aspx
Another solution that you have left out is using a shared file for
communications which can also be extremely fast (I had no issue pushing
10k/second through this mechanism). Generally the way to do this is to use a
checkpointing mechanism, then just seek within the filestream. I have an old
example I could probably pull out if you are interested in going this route
....
I am not sure what you are talking about in dealign with the mutex below,
mutexes are implemented in the .net framework but they are not used for
pushing data from one app to another, they are used for synchronization?
Also there is nothing that says they are bad to use; they are quite often
used to synchronize processes, they are just not generally used within the
same process space as Monitor provides the same functionality with better
performance and without the overhead of the OS resource.
Cheers,
Greg Young
MVP - C#
"Olie" <owaits@xxxxxxxxx> wrote in message
news:1147428284.994920.16280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This post is realy to get some opinions on the best way of getting fast
comunication between multiple applications. I have scowered the web for
imformation on this subject and have just found conflicting views and
far from ideal solutions.
My application has to send small amounts of data about 50bytes to
multiple client applications. The catch is that this has to happen
about 1000 times a second.
My first attempt was .net remotting which I have to say worked very
well. After I developed a host of helper classes to get around such
problems as events it works fine and seems to work. However it is no
where near fast enough and as you start to reach the desired refresh
rate the CPU races the memory usage goes through the roof and the
entire system keels over.
So I have reached the conclusion that remoting is not going to provide
me with the answer. That leaves me with a question, what else? Here is
a list of the candidates I have found to date:
1. Named Pipes
2. Custom Remotting Sink
3. Mutex
4. TCP Socket
Unfortunatly all these solutions seem to have problems. A named pipe is
not part of the .net framework and does not seem to support message
notification very well. I am not even sure if a custom romting Sink
will actually improve things. Again Mutex's are not inherant in the
.net framework; they are not object orientated and are highly
discouraged by Microsoft. A TCP Socket would require allot of work to
construct wrappers and comunications layers, I want an easy life.
So I would apreciate comments on the best method to achieve high
performance and fast inter application comunication. I should say that
primarily I am concerned with applications running on the same machine
and idealy it would be asynchronous.
.
- References:
- Fast Multiple Application Comunication
- From: Olie
- Fast Multiple Application Comunication
- Prev by Date: Re: Naming structs with a variable
- Next by Date: Re: Fast Multiple Application Comunication
- Previous by thread: Fast Multiple Application Comunication
- Next by thread: Re: Fast Multiple Application Comunication
- Index(es):
Relevant Pages
|