[Mono-list] IPC Scenario between a service and a web page
Michał Ziemski
rook at roo.k.pl
Sat Nov 3 06:42:41 EDT 2007
Hi!
I use another file called "remoting conf" for remoting configration thus
removing the need for an ifdef.
You can use an empty file (other than web.config) if you don't want to
instantiate any channels.
This is the way I do it, but it is mostly a matter of prefference.
From my experience in MS.NET as well as Mono you don't have to
instantiate client channels (HTTP TCP IPC) -
they are instantiated automagically from machine.config.
RemotingConfiguration.Configure is useful to create server channels and
other client channels (like named pipes on Linux).
Regards,
Michał Ziemski
Amc Gmail pisze:
> sure.
> only the Mono-specific we have in Global.asax.cs something like:
>
> public void Application_Start(object sender, EventArgs e) {
>
> #if !USING_MONO
> RemotingConfiguration.Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
> "Web.config"));
> #endif
>
> for some reason Mono implicitly instantiate remoting channel(s) from Web.config
> as result i have to do it explicitly only for MS.NET
>
> we have .NET service in behind which is listening tcp channel in
> SingleCall mode.
> i am passing in (int and/or string) to remote object methods
> and returning back int[] and string[].
> it works without a single problem for 3 years on MS.NET and now on
> Mono as well.
> so, if your service is .NET-based then remoting, IMHO, the best.
> in other place we tried event callback's over remoting but have to abandon it.
> it doesn't work well in MS.NET (at least for our purposes).
> -- amc
>
>
> On 11/2/07, Vasili Sviridov <vsviridov at exceede.com> wrote:
>
>> Service is Mono as well as we wanted maximal portability.
>>
>> Also, can you post those init differences? I don't want to be stepping
>> on same rakes...
>>
>> V.
>>
>> Amc Gmail wrote:
>>
>>> We are using simple .NET Remoting with tcp channel and that works
>>> nicely under both MS.NET and Mono. Only the initialization is slightly
>>> different, but it's one line of code under #ifdef.
>>> In other projects we have sockets or WebRequest/WebResponse exchange,
>>> which you may also consider if your service is not a .NET-based but
>>> rather plain c/c++ I did not personally test those on Mono but pretty
>>> sure it's OK.
>>> -- amc
>>>
>>>
>>> On 11/2/07, Robert Jordan <robertj at gmx.net> wrote:
>>>
>>>
>>>> Vasili Sviridov wrote:
>>>>
>>>>
>>>>> Hello all,
>>>>>
>>>>> I have a service which performs TCP/IP data exchange with multiple clients.
>>>>> I also have a web page, on which I'd like to have a "ping" button, that
>>>>> should tell the service to send a certain packet to the client and
>>>>> return a response.
>>>>>
>>>>> My question is - what's the best way to implement this?
>>>>> I've found an implementation of named pipes by Ivan Latunov, but it
>>>>> looks like its windows only. Currently that's OK, but i know for sure
>>>>> that the project will be moved to linux entirely.
>>>>>
>>>>> Is there an implementation that's lightweight and works on both runtimes?
>>>>>
>>>>>
>>>> You could use .NET Remoting with IPC channels. That's .NET 2.0 only,
>>>> though. See System.Runtime.Remoting.IpcChannel on MSDN.
>>>>
>>>> OTOH, since you already have a TCP/IP service, why don't you access
>>>> it via localhost?
>>>>
>>>> Robert
>>>>
>>>> _______________________________________________
>>>> Mono-list maillist - Mono-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Mono-list maillist - Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>
>>>
>>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list