How do .NET applications talk (in the same pc)

  • Thread starter Thread starter aherzallah
  • Start date Start date
A

aherzallah

Hi every one, I am about to write two applications in .NET using C#, my
challenge is how do I make them communicate (both being running in the same
PC)
this is what I was trying
1- using sockets, it appears to be too much for two application running in
the same pc
2- using remoting, again it actually uses sockets under the hood and it is
best when these applications are on the network not at the same pc
3- using interprocess communications (shared memory, pipes, Mailslots), This
also appeared to be something in the past
3- use COM objects, BUT maybe this is not the right approach (not a .NET
way)

please help .... I appreciate your effort and thanks in advance.
 
aherzallah,

All of these are valid ways of communicating between apps that exist on
the same PC. Personally, I would go the remoting route, because when the
next release of .NET comes out (or Indigo, I forget which one), there will
be a very fast channel for interprocess communication communication.

If you code against this model, then all you have to do is swap out the
channel, replacing the TCP channel with the interprocess communication
channel.

Also, I think that someone might have already implemented an
interprocess communication channel using pipes, so this should be an
improvement over using sockets.

Hope this helps.
 
Aaherzallah,

You could also look into using Message Queues or perhaps
even the MailSlot API:s such as CreateMailslot and the
GetMailslotInfo. Once you have a mailslot set up, you use the
normal file manipulation API:s (CreateFile, WriteFile, ReadFile
etc) to work with them.

Hope this helps,

//Andreas

Nicholas Paldino said:
aherzallah,

All of these are valid ways of communicating between apps that exist on
the same PC. Personally, I would go the remoting route, because when the
next release of .NET comes out (or Indigo, I forget which one), there will
be a very fast channel for interprocess communication communication.

If you code against this model, then all you have to do is swap out the
channel, replacing the TCP channel with the interprocess communication
channel.

Also, I think that someone might have already implemented an
interprocess communication channel using pipes, so this should be an
improvement over using sockets.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

aherzallah said:
Hi every one, I am about to write two applications in .NET using C#, my
challenge is how do I make them communicate (both being running in the same
PC)
this is what I was trying
1- using sockets, it appears to be too much for two application running in
the same pc
2- using remoting, again it actually uses sockets under the hood and it is
best when these applications are on the network not at the same pc
3- using interprocess communications (shared memory, pipes, Mailslots), This
also appeared to be something in the past
3- use COM objects, BUT maybe this is not the right approach (not a ..NET
way)

please help .... I appreciate your effort and thanks in advance.
 
playing with the idea of implementing a binary channel for remoting using
pipes seems interesting one.
I guess the message queues is of course a way to do it too, but it does not
scale, and it become a requirement for installing the software to the client
that the MSMQ should be added in the windows componets.
Yet again using remoting by implementing pipes underneath sounds like old
wine in a new bottle.
all I can say that coming with a decision is not easy.
I guess the what apears to be the closest to the right approach is using
remoting.
please comment back if you have any thing to add to this ... thanks again


Andreas Håkansson said:
Aaherzallah,

You could also look into using Message Queues or perhaps
even the MailSlot API:s such as CreateMailslot and the
GetMailslotInfo. Once you have a mailslot set up, you use the
normal file manipulation API:s (CreateFile, WriteFile, ReadFile
etc) to work with them.

Hope this helps,

//Andreas

Nicholas Paldino said:
aherzallah,

All of these are valid ways of communicating between apps that exist on
the same PC. Personally, I would go the remoting route, because when the
next release of .NET comes out (or Indigo, I forget which one), there will
be a very fast channel for interprocess communication communication.

If you code against this model, then all you have to do is swap out the
channel, replacing the TCP channel with the interprocess communication
channel.

Also, I think that someone might have already implemented an
interprocess communication channel using pipes, so this should be an
improvement over using sockets.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

aherzallah said:
Hi every one, I am about to write two applications in .NET using C#, my
challenge is how do I make them communicate (both being running in the same
PC)
this is what I was trying
1- using sockets, it appears to be too much for two application
running
it
is Mailslots),
This
 
aherzallah,

There is already an implementation available. Check out Ingo Rammers
site (watch for line wrap):

http://www.ingorammer.com/RemotingFAQ/RemotingLinks.html

Check out the "Channels" section. There is a named pipes sample, an
MSMQ channel sample, etc, etc. It should get you to where you want to be
until Indigo/Whidbey arrives.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

aherzallah said:
playing with the idea of implementing a binary channel for remoting using
pipes seems interesting one.
I guess the message queues is of course a way to do it too, but it does not
scale, and it become a requirement for installing the software to the client
that the MSMQ should be added in the windows componets.
Yet again using remoting by implementing pipes underneath sounds like old
wine in a new bottle.
all I can say that coming with a decision is not easy.
I guess the what apears to be the closest to the right approach is using
remoting.
please comment back if you have any thing to add to this ... thanks again


Andreas Håkansson said:
Aaherzallah,

You could also look into using Message Queues or perhaps
even the MailSlot API:s such as CreateMailslot and the
GetMailslotInfo. Once you have a mailslot set up, you use the
normal file manipulation API:s (CreateFile, WriteFile, ReadFile
etc) to work with them.

Hope this helps,

//Andreas

"Nicholas Paldino [.NET/C# MVP]" <[email protected]> skrev i
meddelandet news:[email protected]...
aherzallah,

All of these are valid ways of communicating between apps that
exist
on
the same PC. Personally, I would go the remoting route, because when the
next release of .NET comes out (or Indigo, I forget which one), there will
be a very fast channel for interprocess communication communication.

If you code against this model, then all you have to do is swap
out
the
channel, replacing the TCP channel with the interprocess communication
channel.

Also, I think that someone might have already implemented an
interprocess communication channel using pipes, so this should be an
improvement over using sockets.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi every one, I am about to write two applications in .NET using C#, my
challenge is how do I make them communicate (both being running in the
same
PC)
this is what I was trying
1- using sockets, it appears to be too much for two application
running
in
the same pc
2- using remoting, again it actually uses sockets under the hood and
it
is
best when these applications are on the network not at the same pc
3- using interprocess communications (shared memory, pipes, Mailslots),
This
also appeared to be something in the past
3- use COM objects, BUT maybe this is not the right approach (not a .NET
way)

please help .... I appreciate your effort and thanks in advance.
 
Hi,

Check this out too

http://www.genuinechannels.com/

Cheers

Doug Forster

aherzallah said:
playing with the idea of implementing a binary channel for remoting using
pipes seems interesting one.
I guess the message queues is of course a way to do it too, but it does not
scale, and it become a requirement for installing the software to the client
that the MSMQ should be added in the windows componets.
Yet again using remoting by implementing pipes underneath sounds like old
wine in a new bottle.
all I can say that coming with a decision is not easy.
I guess the what apears to be the closest to the right approach is using
remoting.
please comment back if you have any thing to add to this ... thanks again


Andreas Håkansson said:
Aaherzallah,

You could also look into using Message Queues or perhaps
even the MailSlot API:s such as CreateMailslot and the
GetMailslotInfo. Once you have a mailslot set up, you use the
normal file manipulation API:s (CreateFile, WriteFile, ReadFile
etc) to work with them.

Hope this helps,

//Andreas

"Nicholas Paldino [.NET/C# MVP]" <[email protected]> skrev i
meddelandet news:[email protected]...
aherzallah,

All of these are valid ways of communicating between apps that
exist
on
the same PC. Personally, I would go the remoting route, because when the
next release of .NET comes out (or Indigo, I forget which one), there will
be a very fast channel for interprocess communication communication.

If you code against this model, then all you have to do is swap
out
the
channel, replacing the TCP channel with the interprocess communication
channel.

Also, I think that someone might have already implemented an
interprocess communication channel using pipes, so this should be an
improvement over using sockets.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi every one, I am about to write two applications in .NET using C#, my
challenge is how do I make them communicate (both being running in the
same
PC)
this is what I was trying
1- using sockets, it appears to be too much for two application
running
in
the same pc
2- using remoting, again it actually uses sockets under the hood and
it
is
best when these applications are on the network not at the same pc
3- using interprocess communications (shared memory, pipes, Mailslots),
This
also appeared to be something in the past
3- use COM objects, BUT maybe this is not the right approach (not a .NET
way)

please help .... I appreciate your effort and thanks in advance.
 
Back
Top