Re: Fast Multiple Application Comunication



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.



.



Relevant Pages

  • Re: Fast Multiple Application Comunication
    ... In our case many types of applications interfaced to the shared memory. ... not part of the .net framework and does not seem to support message ... performance and fast inter application comunication. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fast Multiple Application Comunication
    ... this in the .net framework. ... This is how Shared Memory works it creates ... a named mutex of memory that can be accessed from many applications. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Killing VB softly with his song, Killing VB softly...with a song.............
    ... your already familiar with the VB syntax and grammar you have to learn OOP ... as applied to the .NET Framework. ... C/C++ applications do not require the framework and run ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Does .net replace win32?
    ... > ontop of windows for general applications, ... applications, so the Win32 API is built with C programmers in mind. ... This makes the .Net Framework cleaner, nicer, easier to use, etc. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Cannot run .NET CF applications
    ... You compiled against the full .NET Framework and what you need is the .NET ... > i'm trying to see how .NET CF applications looks like on my PocketPC 2002. ... > Compilation ends without errors and produces my DummyForm.exe executable that works fine on the desktop PCs i tried it on. ... > Then, i use ActiveSync 3.7 to copy this executable on my iPaq h5450, where i previously installed .NET Compact Framework SP2. ...
    (microsoft.public.dotnet.framework.compactframework)