[Mono-list] IPC Scenario between a service and a web page
Amc Gmail
amc1999 at gmail.com
Mon Nov 5 13:12:19 EST 2007
Yes, it does look better to have a separate remoting.config, we did
not use it for start and have to pay a ifdef price after.
In our case we have server tcp channel defined in App.config (our
services) and few client channels defined in client App.config's and
Web.config. I haven't see any difference between MS.NET and Mono when
RemotingConfiguration based on App.config but when client TCP channel
defined in Web.config Mono is auto-magically instantiate it and MS.NET
does not.
From my point of view Mono behavior is more logical and more close to
Web.config specification. And i have no idea why MS treats Web.config
client tcp channel differently compare to, for example, server http
channel. It is strange, but that's what we have in our ASP.NET 1.1
application.
Anyway, all above is really minor cosmetic issues and in general i
found remoting SingleCall very powerful, reliable and easy to use.
That would be my preferable choice for IPC in .NET
Regards,
amc
On 11/3/07, Michał Ziemski <rook at roo.k.pl> wrote:
> 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