Jim Fawcett CSE775 – Distributed Objects Spring 2004

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

.Net Remoting by James Stone. What is.Net Remoting? RemotingRemoting is a technology that allows.NET applications to communicate. Remoting Same machine,
A component- and message-based architectural style for GUI software
C# and Windows Programming Application Domains and Remoting.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
VAR318: Developing Service Oriented Workflows Brian Noyes IDesign Inc (
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 5: Managing File Access.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 5: Managing File Access.
Distributed Systems Tutorial 2 -.NET Remoting. 2 What is Remoting?  Remoting allows you to pass objects or values across servers in different domains.
Communication in Distributed Systems –Part 2
Distributed Systems Tutorial 3 -.NET Remoting – Crossing Application Boundaries.
.Net Remoting. 2 Distributed Computing under.Net In.Net, there are three levels of access to distributed computing machinery: In.Net, there are three.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 5: Managing File Access.
COM/DCOM Implementation Basics of: Object creation and access Object Reuse Interface referencing.
Copyright © 2003, developerLabs Extending.NET Distributed Applications Stephen Fulcher developerLabs.
.Net Remoting The Other RPC Architecture Doug Gregory October 27, 2003.
Threading in COM What is an Apartment and Why Do I Care?
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
.NET Mobile Application Development XML Web Services.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
RMI (Java RMI) P 460 in text UUIDs / system wide references Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc.
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE775 – Distributed Objects Spring 2006
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Introduction to Windows Programming
Presented by: Ramaswamy Krishnan-Chittur
Jim Fawcett CSE775 – Distributed Objects Spring 2017
Abstract Factory Pattern
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2014
Jim Fawcett CSE775 – Distributed Objects Spring 2009
.NET Remoting Priyanka Bharatula.
Data Virtualization Demoette… ADO.NET Client
Using Application Domains Effectively
Chapter 5 Remote Procedure Call
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2005
Linux Processes & Threads
Distribution and components
Out-of-Process Components
C# COM Interoperability Late Binding
Satisfying Open/Closed Principle
Presented by: Ramaswamy Krishnan-Chittur
Jim Fawcett CSE775 – Distributed Objects Spring 2012
Windows Communication Foundation and Web Services
Jim Fawcett CSE775 – Distributed Objects Spring 2011
Abstract Factory Pattern
Intent (Thanks to Jim Fawcett for the slides)
Programming Models for Distributed Application
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Out-of-Process Components
Jim Fawcett CSE775 – Distributed Objects Spring 2006
Jim Fawcett CSE687 – Object Oriented Design Spring 2003
.Net Application Domains
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2018
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE775 – Distributed Objects Spring 2006
Jim Fawcett CSE687 – Object Oriented Design Spring 2002
Automation and IDispatch
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Message Passing Systems Version 2
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2007
Interception Demonstration
Message Passing Systems
Presentation transcript:

Jim Fawcett CSE775 – Distributed Objects Spring 2004 Interception Jim Fawcett CSE775 – Distributed Objects Spring 2004

References Essential .Net, Volume 1, The Common Lanaguage Runtime, Don Box with Chris Sells, Addison-Wesley, 2003 Aspect-Oriented Programming, Shukla, Fell, Sells, MSDN, March 2002 Advanced .Net Remoting, Ingo Rammer, Apress, 2002 Microsoft .Net Remoting, Scott McLean, James Naftel, Kim Williams, Microsoft Press, 2003

What is Interception? Interception is the process of inserting processing: When marshaling calls between application domains after a client call, but before the method executes after method execution, but before the thread of exectution returns to the client This processing, in .Net, is usually specified by an attribute: [Serializable] [OneWay] One use of interception is to attempt to separate solution domain processing from problem domain processing.

Invoking a Method Interception happens here also

Invocation Message Model The CLR makes method call-stack transformation accessible via the IMessage interface. IMethodMessage provides access to method arguments, return value, and to the metadata for the method via a MethodBase property. This provides access to stack frame contents without requiring knowledge of the stack layout.

Creation of Messages A transparent proxy, created by the CLR, is used to translate method calls into messages. The transparent proxy is always associated with a real proxy, responsible for transforming a MethodCallMessage into a MethodReturnMessage. The transparent proxy then uses the MethodReturnMessage to transform the call stack into the result stack configuration.

Stack to Message to Stack Converts message to stack Converts stack to message

ContextBound Objects Deriving a class from System.ContextBoundObject ensures that every access to an object is through a transparent proxy. A context represents services required by the bound object. The whole purpose of interception is to automatically provide pre and post processing of method calls. This is done with MessageSinks. The context specifies what MessageSink process will be applied to a context bound object.

Message Sinks MessageSinks provide processing applied to MethodCall and MethodReturn messages. This is an extensible process. Any number of MessageSinks can be inserted in connection between a client and target object.

Installing Message Sinks The CLR gives context attribute objects the chance to install context properties as the context is being created. It also gives context property objects the opportunity to put MessageSinks between a proxy and ContextBound object when the proxy is created.

Afterword These notes summarize material provided in Chapter 7 of Don Box’s Essential .Net, Volume 1. In that chapter the author provides a small example that shows code fragments illustrating how to build the interception apparatus. Ingo Rammer in his Advanced .Net Remoting, provides examples of how channels work and how to build custom Message Sinks, in chapters 7, 8, and 9. Scott McLean, et. al., also provide examples of how to build interception in chapters 5, 6, and 7.

End of Presentation