Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2007

Slides:



Advertisements
Similar presentations
Three types of remote process invocation
Advertisements

MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
.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
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
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.
Windows Communication Foundation and Web Services.
Object-Oriented PHP (1)
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.
Distributed Systems Tutorial 3 -.NET Remoting – Crossing Application Boundaries.
Ranga Rodrigo. Class is central to object oriented programming.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
.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.
VWF310: Encapsulate Custom Business Processes with Custom WF Activities Brian Noyes IDesign Inc (
Copyright © 2003, developerLabs Extending.NET Distributed Applications Stephen Fulcher developerLabs.
Chapters 2 & 3. .NET Software development model that allows applications created in disparate programming languages to communicate Universal data access.
Threading in COM What is an Apartment and Why Do I Care?
Chapter 3: Introducing the UML
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.
Use Case, Component and Deployment Diagrams University of Sunderland.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
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
Abstract Factory Pattern
Factory Method Pattern
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2014
Design by Contract Jim Fawcett CSE784 – Software Studio
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
Satisfying Open/Closed Principle
Presented by: Ramaswamy Krishnan-Chittur
Factory Method Pattern
Windows Communication Foundation and Web Services
Abstract Factory Pattern
An Introduction to Visual Basic .NET and Program Design
Intent (Thanks to Jim Fawcett for the slides)
Programming Models for Distributed Application
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Student: Popa Andrei-Sebastian
.Net Application Domains
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2018
Jim Fawcett CSE775 – Distributed Objects Spring 2004
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE775 – Distributed Objects Spring 2006
Jim Fawcett CSE687 – Object Oriented Design Spring 2002
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Message Passing Systems Version 2
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2006
Interception Demonstration
Message Passing Systems
Presentation transcript:

Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2007 Interception Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2007

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: 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., in “.Net Remoting”, also provide examples of how to build interception in chapters 5, 6, and 7.

End of Presentation