Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / February 2008

Tip: Looking for answers? Try searching our database.

Intercepting local calls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Donald Largen - 11 Nov 2003 03:31 GMT
I am trying to intercept local calls to objects.  I have found 3 ways to do
this and they all stink.  The root of the problem is that it forces users of
my implementation to derive from MarshalByRef or ContextBoundObject.  This
will not work.

I don't understand my MSFT did this.  Forcing people to inherit from a super
type to get services doesn't make sense to me, but who am I.

any suggestions

Donald
Sebastien Lambla - 11 Nov 2003 09:46 GMT
You have a few ways to do it, i guess it's the one you've found already:
- Create manually a proxy, a la java dynamic proxy
- ContextBoundObject to provide for a message sink
- MBR with custom message sink when cross appdomain.

Chris Brumme has explained in very deep details why you are forced to
inherit, and why there's a Transparent / Real proxy couple in the .net
world.

But I guess I don't exactly get your question in the first place.

Signature

Sebastien Lambla
http://thetechnologist.is-a-geek.com/blog/

> I am trying to intercept local calls to objects.  I have found 3 ways to do
> this and they all stink.  The root of the problem is that it forces users of
[quoted text clipped - 7 lines]
>
> Donald
Donald Largen - 13 Nov 2003 01:17 GMT
This is my gripe.  I understand why the inheritance is needed, and I
understand proxies.  The thing I don't get is that adding these types of
services is know as adding aspects.  They should be transparent, considering
they have very little to do with the algorithm you are coding (i.e. method
call ).  Also considering the single inheritance model it forces you into
corner.  That's all nothing more nothing less.

Oh joy of interface coloring .. those were the days :>)

> You have a few ways to do it, i guess it's the one you've found already:
> - Create manually a proxy, a la java dynamic proxy
[quoted text clipped - 21 lines]
> >
> > Donald
Sebastien Lambla - 13 Nov 2003 11:09 GMT
The proxying is a relatively transparent way of doing aspects, but has a few
problems:
1. require ContextBoundObject, which are a performance headache
2. not automatic, not trivial

I think Microsoft thought a lot of AOP, especially with COM+ and, for
example, EntrepriseServices objects. The thing is, they did discover one
thing, which is that as soon as you use AOP in an arbitrary way, you have to
take into account:
1. The fact that each aspect might have a problem and would want to stop
execution
2. The chain of aspects needs to know there was this problem
3. Some aspects may require other aspects.

That's why, I believe, Microsoft did provide a good tool for aspects, but
only usable internally at Microsoft, and try to discourage anyone from doing
it themselves. Chris Brumme already said the performance of
ContextBoundObjects should be enhanced. At the same way, their scope is
being reduced (if not dropped) by Indigo.

I think that AOP might have a new life when method-call scoped contexts
appears in the Indigo time frame. Till then, just don't rely on it :)

Signature

Sebastien Lambla
http://thetechnologist.is-a-geek.com/blog/

> This is my gripe.  I understand why the inheritance is needed, and I
> understand proxies.  The thing I don't get is that adding these types of
[quoted text clipped - 32 lines]
> > >
> > > Donald
myronleroy - 23 Feb 2008 22:46 GMT
Have you ever sold an electric yo-yo? please reply.

>I am trying to intercept local calls to objects.  I have found 3 ways to do
>this and they all stink.  The root of the problem is that it forces users of
[quoted text clipped - 7 lines]
>
>Donald

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.