Distributed Objects Technologies: .NET and CORBA
date post
25-Feb-2016Category
Documents
view
31download
5
Embed Size (px)
description
Transcript of Distributed Objects Technologies: .NET and CORBA
Distributed Objects Technologies:.NET and CORBANaim R. El-Far, PhD Candidate
TA for SEG3202 Software Design and Architecture with N. El-Kadri (Summer 2005)
Tutorial 4 of 4 24/6/2005
About Todays MaterialSome of todays material has been adapted from presentations by D. Schmitt of Microsoft, and Dr. I. Stoica of UC Berkeley.
In PerspectiveClient/Server Architecture (Tutorial 1)N-Tier Architecture (Tutorial 2)Concept of Distributed Objects (Tutorial 3)Technologies for Distributing ObjectsJava RMI J2EE (Tutorial 3).NET (Todays tutorial)CORBA (Todays tutorial)
.NET Enterprise VisionSchedulingAuthenticationNotificationCustomerOperationsSalesSupplyEngineeringCustomerServiceUsers Any device, Any place, Any timeRoles/Experiences Get the right info To the right user At the right timeXML Web Services Integrate and orchestrate business applications and processes Back Office Heterogeneous application and server infrastructure
What is .NET?A generic term for the MS visionThe successor to Windows DNASometimes applied to product namesSuch as Windows .NET ServerA specific software frameworkIncludes a common runtimeCommon across OS and dev languageIncludes baseline dev tools in an SDKIncludes powerful dev environmentVisual Studio .NET
.NET WorkingsAn evolution from COM/DCOM Windows DNA .NETPlatform-independentInternet integrationSecurity
Primary ComponentsCommon Language Infrastructure (CLI): specifications for a runtime environment, including a common type system, base class library, and a machine-independent intermediate code known as the Common Intermediate Language (CIL) MSIL.Common Language Runtime (CLR): Runtime environment to run any CIL code that adheres to CLI specs usually through JIT compilation.
.NET WorkingsAll CIL is self-describing through .NET metadata.Language implementation CIL CLR MSIL .NET languages.NET assemblies, DLL or EXE for Win32. The .NET unit of deployment, versioning and security (64 bit public/private key). All code is compiled, not interpretedConverted to native machine code at install time (via NGEN) or run time (via JIT compiler)Static code managementVersioning, localizing, and signingConfigurable assembly resolverGlobal assembly cache (GAC)Dynamic code managementMemory allocation with garbage collectionLifecycle management via reference trackingThread pooling
.NET WorkingsFine-grained code access securityAugments OS security (user credentials)Ensures that code only performs operations allowed by policies set by user or administratorBased on code source, publisher signature, and other evidenceFlexible deploymentSimple XCOPY (since not bound to Windows registry)Windows installer Auto-deploy (aka no-touch or zero-impact)Flexible remotingIncludes XML/SOAP and binaryRemoting model is easily extendedIntegrates with web services
Compilation & ExecutionCompilationBefore installation or the first time each method is calledAssembly Unit of deployment,similar to DLL or EXE with added metadataSaved in cacheAn assembly can also be pre-compiled as part of deployment
CLR Internals
.NET Structure: CLR and Win32 Services C#VBASP.NETADO.NETEnterprise ServicesCLRMSMQCOM+ActiveDirectoryIISWMIWin32 J#...Same class library across all programming languagesConnects .NET to COM+ for transactional components and other enterprise servicesConnects .NET to data providers, including XML documentsProvides WebForms for thin clients, plus web services via HTTP
.NET Framework: More generally
.NET FrameworkWindowsStandard .NETFramework
Windows Framework ExtensionsOther FrameworkExtensionsFramework FeaturesApplication Reach across DevicesOther OS Internet and Web Services
.NET Mobility FrameworkWindows CE.NET Compact Framework
Windows CE Framework ExtensionsDevice Vendor FrameworkExtensionsFramework FeaturesApplication Reach across DevicesOther OS Internet and Web Services
.NET on non-MS Operating SystemsMicrosofts Shared Source Initiative:Rotor: Microsoft shared-source version of .NET for FreeBSDMono: Novell (formerly by Ximian) open-source version of .NET for GNU/Linux, UNIX, Mac OS X, and Windows based computers.Portable .NET: is part of the DotGNU project.
Introduction to CORBACommon Object Request Broker Architecture (CORBA)A standard for software componentry. Created and controlled by the Object Management Group (OMG). Defines APIs, communication protocol, and object/service information models to enable heterogeneous applications written in various languages running on various platforms to interoperate platform and location transparency for sharing well-defined objects across a distributed computing platform.CORBA "wraps" code written in some language into a bundle containing additional information on the capabilities of the code inside, and how to call it. The resulting wrapped objects can then be called from other programs (or CORBA objects) over the network. CORBA can be considered as a machine-readable documentation format.Interface Definition Language (IDL) to specify the interfaces that objects will present to the world.A "mapping" from IDL to a specific implementation language like C++ or Java. Standard mappings exist for Ada, C, C++, Lisp, Smalltalk, Java, and Python. There are also non-standard mappings for Perl and Tcl implemented by ORBs written for those languages.
High-Level Overview of CORBACORBA applications are composed of objects.For each object type you define an interface in OMG IDL. CORBA = Separation of interface from implementation. Well-defined, strict interfaces.Hidden implementation. Clients access objects only through their advertised interface.
CORBA Architecture
StubProvides interface between client object and ORB Marshalling: client invocationUnmarshalling: server responseORBC++ ObjectClientServerJava ObjectIIOPORBStubObject AdapterSkeleton
SkeletonProvides iterface between server object and ORBUnmarshaling: client invocationMarshaling: server response
ORBC++ ObjectClientServerJava ObjectIIOPORBStubObject AdapterSkeleton
(Portable) Object Adapter (POA)Register class implementationsCreates and destroys objects Handles method invokationHandles client authentication and access controlORBC++ ObjectClientServerJava ObjectIIOPORBStubObject AdapterSkeleton
Object Request Broker (ORB)Communication infrastructure sending messages between objectsCommunication type:GIOP (General Inter-ORB Protocol)IIOP (Internet Inter-ORB Protocol) (GIOP on TCP/IP)ORBC++ ObjectClientServerJava ObjectIIOPORBStubObject AdapterSkeleton
CORBA ObjectServerInterfaceIDL
C++/JavaImplementation
Interoperable Object ReferenceCORBAObjectServant
Example of CORBA ServicesNaming: Keeps track of association between object names and their reference. Allows ORB to locate referenced objectsLife Cycle: Handles the creation, copying, moving, and deletion objectsTrader: A yellow pages for objects. Lets you find them by the services they provideEvent: Facilitates asynchronous communications through events Concurrency: Manages locks so objects can share resourcesQuery: Locates objects by specified search criteria
Remote Invocation in CORBAOversimplification:Client first obtains its object reference (E.g. Naming Service and the Trader Service).Remote invocation = local invocation + substituting the object reference for the remote instance.ORB examines the object reference and discovers that the target object is remote routes the invocation out over the network to the remote object's ORB.
Remote Invocation in CORBAIn more detail:IDL the client knows exactly which operations it may invoke, what the input parameters are, and where they have to go in the invocationIIOP (ORBs may use other protocols)Although the ORB can tell from the object reference that the target object is remote, the client can not.
Object Invocation ModelsInvocation models supported in CORBA
Request typeFailure semanticsDescriptionSynchronousAt-most-onceCaller blocks until a response is returned or an exception is raisedOne-wayBest effort deliveryCaller continues immediately without waiting for any response from the serverDeferred synchronousAt-most-onceCaller continues immediately and can later block until response is delivered
InteroperabilityAllow multi-vendor ORB implementations to communicate with each otherGeneral Inter-ORB Protocol (GIOP) message types
Object ReferencesThe organization of an IOR with specific information for IIOP
Secure Object Invocation in CORBA
CORBA ApplicationDefine interface using IDLCompile interfaceImplement interfaceInstantiate server: Register object as a CORBA objectInstantiate client:Invoke CORBA objectExample using a Java client and server
J2EE vs. .NETCola vs. PepsiAre you starting from scratch?Are you migrating from a legacy system?One day, J2EE and .NET will become legacy systems.Past, Present, and Future.Web Services Body OrgansFor more details (a little out of date by comprehensive: http://www.theserverside.com/articles/article.tss?l=J2EE-vs-DOTNET)
Where does CORBA fit it?Purpose of CORBAIIOP, a pillar of CORBAJ2EE support for IIOP.NET support for IIOP (IIOP.NET, Janeva)CORBA, J2EE, and .NET: like everything else, the mix depends on your purpose, the past, the present, and the future of your system.