Is there an alternative to remoting?

  • Thread starter Thread starter Michael Culley
  • Start date Start date
M

Michael Culley

In vb6 it was possible to create an exe as an activeX exe and communicate
between 2 apps. Now we have remoting which requires opening a tcp port to
listen on, which seems kinda crappy cause another app might be using the
same port. Is there an alternative way of communicating between 2 exes on
the same machine?

Thanks,
Michael Culley
 
Hello Michael,

You can perform cross-AppDomain calls as well. The biggest problem here
would probably be how to get a reference to another application's AppDomain.
This way, as far as I remember, uses the same Remoting mehcanics underneath.
 
Hi Michael,

Thank you for posting in this group.

You can create your own http channel to implement inter-process
communication.
Also, you can refer to the .Net interop to use the Windows inter-process
communication technologies
such as Named pipe, Memory Mapping file and so on.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Michael Culley" <[email protected]>
| Subject: Is there an alternative to remoting?
| Date: Tue, 16 Sep 2003 15:14:45 +1000
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: cpe-144-137-26-13.vic.bigpond.net.au 144.137.26.13
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:184418
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| In vb6 it was possible to create an exe as an activeX exe and communicate
| between 2 apps. Now we have remoting which requires opening a tcp port to
| listen on, which seems kinda crappy cause another app might be using the
| same port. Is there an alternative way of communicating between 2 exes on
| the same machine?
|
| Thanks,
| Michael Culley
|
|
|
 
Dmitriy Lapshin said:
Hello Michael,

You can perform cross-AppDomain calls as well. The biggest problem here
would probably be how to get a reference to another application's AppDomain.
This way, as far as I remember, uses the same Remoting mehcanics underneath.

That brings up a question of my own, is there a way in the framework to
perform cross app-domain communication without using external methods (TCP,
pipes, shared memory, etc) or remoting. A low-level inproc communication
system that doesn't have the annoyances or restrictions of remoting between
appdomains could have its uses...
Or I could just be crazy, does it matter?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Michael Culley said:
In vb6 it was possible to create an exe as an activeX exe and communicate
between 2 apps. Now we have remoting which requires opening a tcp port to
listen on, which seems kinda crappy cause another app might be using the
same port. Is there an alternative way of communicating between 2 exes on
the same machine?

Thanks,
Michael Culley
 
Not crazy. I have looked for more info on this with little uncovered. I
seem to remember reading the help pages one time and they talked about
remoting in the same machine uses optimized communication somehow. However,
you still need to ref ports so maybe they just mean they use the local
loopback instead of going all the way down the network stack. IMO, they
could use an LPC channel (that maybe uses named pipes under the hood) for
remoting too. I think a third party makes one. For that matter a shared
memory arc in the clr would be nice and remove the need for remoting for
some things. How about being able to publish a shared stream or array (or
int) and have another app subscribe to that stream using just attributes on
fields to denote the intentions.

--
William Stacey, DNS MVP

Daniel O'Connell said:
Dmitriy Lapshin said:
Hello Michael,

You can perform cross-AppDomain calls as well. The biggest problem here
would probably be how to get a reference to another application's AppDomain.
This way, as far as I remember, uses the same Remoting mehcanics underneath.

That brings up a question of my own, is there a way in the framework to
perform cross app-domain communication without using external methods (TCP,
pipes, shared memory, etc) or remoting. A low-level inproc communication
system that doesn't have the annoyances or restrictions of remoting between
appdomains could have its uses...
Or I could just be crazy, does it matter?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Michael Culley said:
In vb6 it was possible to create an exe as an activeX exe and communicate
between 2 apps. Now we have remoting which requires opening a tcp port to
listen on, which seems kinda crappy cause another app might be using the
same port. Is there an alternative way of communicating between 2 exes on
the same machine?

Thanks,
Michael Culley
 
Michael,

If you want, you can also use component services to do this. If you
create a COM+ component that runs in a service process, and that is pooled
so that there is only one instance at a time, you will get the same thing.
Because both processes will access the same instance, you can use that
instance as a bridge between the two. You can also use loosely coupled
events to indicate when other listeners should wake up (which applications
would subscribe to dynamically).

Hope this helps.
 
Hi All,

The Name pipe also uses Memory Mapping file under the hood.
Before the appear of the .Net Framework, the windows uses these ways of
inter-proc
communication, so I think the .Net Remoting also uses these classic windows
inter-proc
communication under the hood.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "William Stacey" <[email protected]>
| References: <#[email protected]>
<[email protected]> <tSz9b.467147$YN5.318200@sccrnsc01>
| Subject: Re: Is there an alternative to remoting?
| Date: Tue, 16 Sep 2003 10:14:28 -0400
| Lines: 65
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 66.188.59.114.bay.mi.chartermi.net 66.188.59.114
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:184563
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Not crazy. I have looked for more info on this with little uncovered. I
| seem to remember reading the help pages one time and they talked about
| remoting in the same machine uses optimized communication somehow.
However,
| you still need to ref ports so maybe they just mean they use the local
| loopback instead of going all the way down the network stack. IMO, they
| could use an LPC channel (that maybe uses named pipes under the hood) for
| remoting too. I think a third party makes one. For that matter a shared
| memory arc in the clr would be nice and remove the need for remoting for
| some things. How about being able to publish a shared stream or array (or
| int) and have another app subscribe to that stream using just attributes
on
| fields to denote the intentions.
|
| --
| William Stacey, DNS MVP
|
| | >
| > "Dmitriy Lapshin [C# / .NET MVP]" <[email protected]>
wrote
| > in message | > > Hello Michael,
| > >
| > > You can perform cross-AppDomain calls as well. The biggest problem
here
| > > would probably be how to get a reference to another application's
| > AppDomain.
| > > This way, as far as I remember, uses the same Remoting mehcanics
| > underneath.
| > >
| >
| > That brings up a question of my own, is there a way in the framework to
| > perform cross app-domain communication without using external methods
| (TCP,
| > pipes, shared memory, etc) or remoting. A low-level inproc communication
| > system that doesn't have the annoyances or restrictions of remoting
| between
| > appdomains could have its uses...
| > Or I could just be crazy, does it matter?
| >
| > > --
| > > Dmitriy Lapshin [C# / .NET MVP]
| > > X-Unity Test Studio
| > > http://x-unity.miik.com.ua/teststudio.aspx
| > > Bring the power of unit testing to VS .NET IDE
| > >
| > > | > > > In vb6 it was possible to create an exe as an activeX exe and
| > communicate
| > > > between 2 apps. Now we have remoting which requires opening a tcp
port
| > to
| > > > listen on, which seems kinda crappy cause another app might be using
| the
| > > > same port. Is there an alternative way of communicating between 2
exes
| > on
| > > > the same machine?
| > > >
| > > > Thanks,
| > > > Michael Culley
| > > >
| > > >
| > >
| >
| >
|
|
|
 
Thanks everyone who replied. It's good to see I'm not crazy. Nicholas, can
you give me more info?

Jeffrey,
Also, you can refer to the .Net interop to use the Windows inter-process
communication technologies
such as Named pipe, Memory Mapping file and so on.

Can you give me some more info on this?

Cheers,
Michael Culley
 
Jeffrey Tan said:
Hi All,

The Name pipe also uses Memory Mapping file under the hood.
Before the appear of the .Net Framework, the windows uses these ways of
inter-proc
communication, so I think the .Net Remoting also uses these classic windows
inter-proc
communication under the hood.
So I would suspect, however I was more curious as to if the communications
mechanism was exposed (pretty sure its not). Rolling my own memory
mapping\named pipe communication system isn't something I want to do often,
actually, lol.
Not that I have any reason to need to, just curious.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
| Subject: Re: Is there an alternative to remoting?
| Date: Tue, 16 Sep 2003 10:14:28 -0400
| Lines: 65
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 66.188.59.114.bay.mi.chartermi.net 66.188.59.114
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:184563
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Not crazy. I have looked for more info on this with little uncovered. I
| seem to remember reading the help pages one time and they talked about
| remoting in the same machine uses optimized communication somehow.
However,
| you still need to ref ports so maybe they just mean they use the local
| loopback instead of going all the way down the network stack. IMO, they
| could use an LPC channel (that maybe uses named pipes under the hood) for
| remoting too. I think a third party makes one. For that matter a shared
| memory arc in the clr would be nice and remove the need for remoting for
| some things. How about being able to publish a shared stream or array (or
| int) and have another app subscribe to that stream using just attributes
on
| fields to denote the intentions.
|
| --
| William Stacey, DNS MVP
|
| | >
| > "Dmitriy Lapshin [C# / .NET MVP]" <[email protected]>
wrote
| > in message | > > Hello Michael,
| > >
| > > You can perform cross-AppDomain calls as well. The biggest problem
here
| > > would probably be how to get a reference to another application's
| > AppDomain.
| > > This way, as far as I remember, uses the same Remoting mehcanics
| > underneath.
| > >
| >
| > That brings up a question of my own, is there a way in the framework to
| > perform cross app-domain communication without using external methods
| (TCP,
| > pipes, shared memory, etc) or remoting. A low-level inproc communication
| > system that doesn't have the annoyances or restrictions of remoting
| between
| > appdomains could have its uses...
| > Or I could just be crazy, does it matter?
| >
| > > --
| > > Dmitriy Lapshin [C# / .NET MVP]
| > > X-Unity Test Studio
| > > http://x-unity.miik.com.ua/teststudio.aspx
| > > Bring the power of unit testing to VS .NET IDE
| > >
| > > | > > > In vb6 it was possible to create an exe as an activeX exe and
| > communicate
| > > > between 2 apps. Now we have remoting which requires opening a tcp
port
| > to
| > > > listen on, which seems kinda crappy cause another app might be using
| the
| > > > same port. Is there an alternative way of communicating between 2
exes
| > on
| > > > the same machine?
| > > >
| > > > Thanks,
| > > > Michael Culley
| > > >
| > > >
| > >
| >
| >
|
|
|
 
That would be cool. They should document that (If not already) if so. So
if you create a tcp or http channel and use remoting between another process
or appdomain on the same box, then it somehow figures that out and ignores
the tcp layer and just plugs in a named pipe under the hood?

--
William Stacey, DNS MVP

Jeffrey Tan said:
Hi All,

The Name pipe also uses Memory Mapping file under the hood.
Before the appear of the .Net Framework, the windows uses these ways of
inter-proc
communication, so I think the .Net Remoting also uses these classic windows
inter-proc
communication under the hood.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
| Subject: Re: Is there an alternative to remoting?
| Date: Tue, 16 Sep 2003 10:14:28 -0400
| Lines: 65
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 66.188.59.114.bay.mi.chartermi.net 66.188.59.114
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:184563
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Not crazy. I have looked for more info on this with little uncovered. I
| seem to remember reading the help pages one time and they talked about
| remoting in the same machine uses optimized communication somehow.
However,
| you still need to ref ports so maybe they just mean they use the local
| loopback instead of going all the way down the network stack. IMO, they
| could use an LPC channel (that maybe uses named pipes under the hood) for
| remoting too. I think a third party makes one. For that matter a shared
| memory arc in the clr would be nice and remove the need for remoting for
| some things. How about being able to publish a shared stream or array (or
| int) and have another app subscribe to that stream using just attributes
on
| fields to denote the intentions.
|
| --
| William Stacey, DNS MVP
|
| | >
| > "Dmitriy Lapshin [C# / .NET MVP]" <[email protected]>
wrote
| > in message | > > Hello Michael,
| > >
| > > You can perform cross-AppDomain calls as well. The biggest problem
here
| > > would probably be how to get a reference to another application's
| > AppDomain.
| > > This way, as far as I remember, uses the same Remoting mehcanics
| > underneath.
| > >
| >
| > That brings up a question of my own, is there a way in the framework to
| > perform cross app-domain communication without using external methods
| (TCP,
| > pipes, shared memory, etc) or remoting. A low-level inproc communication
| > system that doesn't have the annoyances or restrictions of remoting
| between
| > appdomains could have its uses...
| > Or I could just be crazy, does it matter?
| >
| > > --
| > > Dmitriy Lapshin [C# / .NET MVP]
| > > X-Unity Test Studio
| > > http://x-unity.miik.com.ua/teststudio.aspx
| > > Bring the power of unit testing to VS .NET IDE
| > >
| > > | > > > In vb6 it was possible to create an exe as an activeX exe and
| > communicate
| > > > between 2 apps. Now we have remoting which requires opening a tcp
port
| > to
| > > > listen on, which seems kinda crappy cause another app might be using
| the
| > > > same port. Is there an alternative way of communicating between 2
exes
| > on
| > > > the same machine?
| > > >
| > > > Thanks,
| > > > Michael Culley
| > > >
| > > >
| > >
| >
| >
|
|
|
 
Hi Michael,

May be these 2 links below can help you:
http://www.codeproject.com/dotnet/globalcache.asp?target=memory|mapping|
file#xxxx
http://www.codeproject.com/csharp/genericchannelsfw.asp?target=named+pipe#xx
487602xx

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Michael Culley" <[email protected]>
| References: <#[email protected]>
<[email protected]>
| Subject: Re: Is there an alternative to remoting?
| Date: Wed, 17 Sep 2003 11:29:34 +1000
| Lines: 15
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: cpe-144-137-26-13.vic.bigpond.net.au 144.137.26.13
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:185303
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks everyone who replied. It's good to see I'm not crazy. Nicholas, can
| you give me more info?
|
| Jeffrey,
|
| > Also, you can refer to the .Net interop to use the Windows inter-process
| > communication technologies
| > such as Named pipe, Memory Mapping file and so on.
|
| Can you give me some more info on this?
|
| Cheers,
| Michael Culley
|
|
|
 
Back
Top