18-349: Introduction to Embedded Systems Embedded Middleware Lecture 23.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
CORBA Architecture Nitin Prabhu. Outline CORBA Object Model CORBA Architecture Static Invocation Dynamic Invocation CORBA Communication Model.
Seminarium on Component-based Software Engineering Jan Willem Klinkenberg CORBA.
Netprog CORBA Intro1 CORBA Common Object Request Broker Architecture Based partially on Notes by D. Hollinger and Java Network Programming and Distributed.
Distributed Systems Architectures
Advanced Java Class Network Programming. Network Protocols Overview Levels of Abstraction –HTTP protocol: spoken by Web Servers and Web Clients –TCP/IP:
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
II. Middleware for Distributed Systems
Practical Issues of RPCCS-4513, D-Term Remote Procedure Call Practical Issues CS-4513 Distributed Computing Systems (Slides include materials from.
Object Based Operating Systems1 Learning Objectives Object Orientation and its benefits Controversy over object based operating systems Object based operating.
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
2 Systems Architecture, Fifth Edition Chapter Goals Describe client/server and multi-tier application architecture and discuss their advantages compared.
Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir.
CORBA Programming Using ACE/TAO
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CORBA Celsina Bignoli Enterprise Computing Corporation have similar computing environments: –mixed set of HW platforms –a mixed set.
1 G52IWS: Distributed Computing Chris Greenhalgh.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
第十四章 J2EE 入门 Introduction What is J2EE ?
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Lecture 15 Introduction to Web Services Web Service Applications.
Comparison of Web Services, RMI, CORBA, DCOM Usha, Lecturer MCA Department of Computer Science and Engineering.
Information Management NTU Interprocess Communication and Middleware.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Abhishek Bachchan Vishal Patangia
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
Java Programming: Advanced Topics 1 Networking Programming Chapter 11.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
CS551 - Lecture 11 1 CS551 Object Oriented Middleware (III) (Chap. 5 of EDO) Yugi Lee STB #555 (816)
 Common Object Request Broker Architecture  An industry standard developed by OMG to help in distributed programming.
Distributed Objects and Remote Invocation Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
January 25, 2016 First experiences with CORBA Niko Neufeld.
Introduction to Distributed Systems and CORBA Slides for CSCI 3171 Lectures E. W. Grundke.
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
CORBA Antonio Vasquez, John Shelton, Nidia, Ruben.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
Common Object Request Broker Architecture (CORBA)
CORBA Alegria Baquero.
Ch > 28.4.
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Inventory of Distributed Computing Concepts
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

18-349: Introduction to Embedded Systems Embedded Middleware Lecture 23

18-349: Introduction to Embedded Systems Previous Lecture Source of deterministic errors and random noises Basics of signal spectrum –Nyquist sampling –Fourier transform Basic filters –What you can do and when you should ask for help

18-349: Introduction to Embedded Systems Overview of Today’s Lecture What is middleware? –CORBA –Java (EJB) –DCOM –Comparing different middleware Get to know one middleware (CORBA) in depth Middleware in embedded systems –What are the criteria?

18-349: Introduction to Embedded Systems Moving Beyond A Single Processor So far, we’ve only dealt with the issues of a single embedded processor What if we want to get embedded processors to run applications that communicate across the network? Networked/distributed programs –Processes that communicate over the network (or on the same machine) –Client – piece of code that requests services –Server – piece of code that provides the services

18-349: Introduction to Embedded Systems Writing Distributed Programs Common ways of writing distributed client-server programs Sockets –Low-level interface to the operating system for TCP and UDP STREAMS –Even lower-level interface within the kernel (almost device-driver level) Shared memory –Low-level interface for clients and servers on the same machine to communicate using a chunk of memory that they share Shared files –Clients and servers exchange information through a shared file system RPC (Remote Procedure Call) –Clients communicate with long-lived server processes (daemons) over the network

18-349: Introduction to Embedded Systems Socket Programming Server’s role 1.Binds to an Internet (IP) address 2.Listens for clients on the network 3.Provides services to clients that connect to it Client’s role 1.Knows the server’s IP address 2.Connects to the server 3.Sends service requests Client and server exchange messages over TCP or UDP Socket/networking code mixed with “real” client and server logic Client Server Exchange of messages over an established connection Listens for more clients TCP or UDP

18-349: Introduction to Embedded Systems Low-level Network Programming Very efficient mechanism Available on almost every operating system Standardized application programming interface (API) Can be used for clients and servers to communicate on the same machine and across the network But ….. –Exposes too many low-level details –Application writer must be able to debug network-level issues and problems –Mixes application logic with networking logic –Clients must know where servers live –If client and server run on different byte-ordered machines, they must be aware of these differences in talking to each other

18-349: Introduction to Embedded Systems ….. And Middleware was Born Layer between the operating system and the application Hides the operating system’s details from the application developer –CORBA, EJB, DCOM Why do we need/have middleware? –It makes it easier to write distributed applications –Takes care of all the networking code and the messaging –Leaves you free to focus on writing the application

18-349: Introduction to Embedded Systems High-Level Overview of Middleware Client Process Server Process Server’s real implementation (in a programming language) Client’s real implementation (in a programming language) Middleware Some protocol over TCP/IP IDL Compiler Client-side “Glue” Server-side “Glue” Written in a programming language, but independent of clients Server Interface Written in some neutral Interface Definition Language (IDL)

18-349: Introduction to Embedded Systems CORBA (Common Object Request Broker Architecture) Middleware for interoperability from the Object Management Group –CMU is a member of the OMG, along with 800 other companies/universities The key component is the “broker” (ORB) –Shields the client and the server from each other’s differences What’s the CORBA client-server model? –Language transparency: Clients and servers can be written in different programming languages –Location transparency: Client and server don’t care about each other’s locations –Interoperability: Clients and servers can run on different hardware, operating systems and still be able to talk to each other using a protocol called IIOP –No support for distributed garbage collection Real-Time CORBA standard available

18-349: Introduction to Embedded Systems CORBA - Putting All The Pieces Together

18-349: Introduction to Embedded Systems J2EE (Java 2 Enterprise Edition ) Sun Microsystems’ Java-based middleware –Implicitly has all of Java’s portability advantages –Component: application-level software unit –Container: runtime support/services for a component On the client side –Applets, application clients executing in their own JVM On the server side –Web components Servlets and Java Server Pages (JSP) –Enterprise Java Beans (EJB) components can contain two kinds of objects Session beans: valid for the duration of a client-server session Entity beans: valid for the lifetime of the persistent data that it manages What makes J2EE powerful? –Can interface to multiple existing back-end systems and technologies –Power of Java’s intrinsic portability, graphical, web & garbage collection capabilities Real-Time Java standard available

18-349: Introduction to Embedded Systems J2EE - Putting All The Pieces Together

18-349: Introduction to Embedded Systems DCOM (Distributed Component Object Model) Microsoft’s middleware DCOM server –Body of code containing multiple objects –Each object can support multiple interfaces –Can be written in Java, C++, Pascal DCOM client –Gets a pointer to one of the interfaces –Talks to the server over that interface –Doesn’t care if the server is local or remote Client-server communication –Occurs over the Object Remote Procedure Call (ORPC) –Originates from DCE’s RPC (where Distributed Computing Environment, or DCE, was one of the earliest middleware platforms) –The broker is called the Service Control Manager (SCM) Some support for distributed garbage collection

18-349: Introduction to Embedded Systems DCOM - Putting All The Pieces Together

18-349: Introduction to Embedded Systems Critical Thinking What are the differences between DCOM, EJB and CORBA?

18-349: Introduction to Embedded Systems Overview of CORBA CORBA CLIENT CORBA SERVER IDL-to-Java/C++ Compiler Java/C++ Stub Java/C++ Skeleton Server’s IDL Interface Platform IIOP (Internet Inter-ORB Protocol) Platform POA Client Logic Servant ORB

18-349: Introduction to Embedded Systems Interface Definition Language (IDL) Used to define –Interfaces: methods or behavior (but not attributes or state) of a server object –Modules: packages of related interfaces and types IDL is not a programming language –No conditional constructs such as if, else, then, while, do, etc. IDL compiler –Provided with every ORB –Input = Server’s interface in IDL –Output = Skeleton and stub in a programming language (Java, C++, etc.) What are the IDL types? –Basic types: octet, char, short, long, double –Structured types: string, sequence, union, struct –Arbitrary types: any –User-defined types: e.g., interfaces

18-349: Introduction to Embedded Systems Example of an IDL Interface module Bank { exception ZeroBalance {}; typedef sequence DepositHistory; interface Account { string getBalance( in string accountNumber); void depositMoney( in double amount, out double balance, inout DepositHistory latest); double withdrawMoney ( in double amount) raises (ZeroBalance); };

18-349: Introduction to Embedded Systems Stubs and Skeletons What is a stub, anyway? –Automatically generated by the IDL compiler –Client-side glue in Java/C++ –Marshals (packages) parameters from the client into a message to be sent to the server –Unmarshals results from the response message What is a skeleton, anyway? –Automatically generated by the IDL compiler –Server-side glue in Java/C++ –Unmarshals (unpackages) messages into the parameters that the client intended to send –Marshals results into a response message

18-349: Introduction to Embedded Systems Portable Object Adapter (POA) Exists only within CORBA servers Dispatches incoming requests to the right target servants Also acts as a namespace for the collection of servants it manages Additional policies that you can use to customize a POA: –Multithreading –Activation on demand –Persistent references (lifespan of objects) –Unique object identifiers A server process can have multiple POAs, each configured differently, and each responsible for a certain set of servants

18-349: Introduction to Embedded Systems CORBA’s Protocols General Inter-ORB Protocol (GIOP) –Specification of a protocol, and not the implementation –Eight message formats: Request, Reply, LocateRequest, LocateReply, CancelRequest, MessageError, CloseConnection, Fragment –Well-defined headers for every message –Carries the sender’s byte ordering –Can be mapped onto any “real” protocol that is connection-oriented Internet Inter-ORB Protocol (IIOP) –Concrete implementation of GIOP specification onto TCP/IP –Must be supported by every ORB –Allows objects to communicate without caring about their operating systems, hardware architectures, etc.

18-349: Introduction to Embedded Systems Other CORBA Components Implementation Repository –Stores location of the executables in your file system –Run-time registry of servers and clients –Very specific to the vendor Interface Repository –Stores the type information of all CORBA objects in your application –Dynamic invocation interface implies that you don’t know your types ahead of time, and you can look these up at run-time Naming Service –Registry of user-friendly names associated with object references –Servants can bind references by a name –Clients can look up references by that name

18-349: Introduction to Embedded Systems Interoperable Object References (IORs) Stringified format of a reference –Can be stored in a file, sent across the network, etc. –Contains server’s hostname, port number, object key, etc. Sample IOR looks like this: IOR: c3a f756e743a312e d6d61792e e6b6f6e652e636f6d00007b c f410a20b IOR:0100…. Server object_to_string() Client string_to_object()

18-349: Introduction to Embedded Systems System and User Exceptions Exception – Something bad/illegal/undesirable occurred System Exceptions –Defined within the CORBA standard –Can alert the application of communication errors, resource exhaustion, invalid object references, host crashes –Usually raised by the ORB before the request gets to the servant –Format of a System Exception Minor code: Identifies the source of the problem (e.g., COMM_FAILURE) Completion status: COMPLETED_YES, COMPLETED_NO, COMPLETED_MAYBE –Make sure that your CORBA clients catch system exceptions! User Exceptions –Can be defined within IDL interfaces –Each method of an interface can raise exceptions

18-349: Introduction to Embedded Systems

Inside Your Netscape Browser

18-349: Introduction to Embedded Systems Middleware in Embedded Systems Requirements –Limited resources: Smaller footprint (requires less code-bloat) –Real-time support (available in Real-Time CORBA specification) Full CORBA implementation: 150 Kbytes – 5 Mbytes! What are your options? –Minimal CORBA: Throw out some of the heavyweight CORBA mechanisms (~ Kbytes) –IIOP Engine: Use a library that keeps only the IIOP protocol part (~ 15 Kbytes) –CORBA Gateways: TCP bridge from the embedded processors to a CORBA gateway that talks to the rest of the world

18-349: Introduction to Embedded Systems Using CORBA Gateways

18-349: Introduction to Embedded Systems Summary of Lecture What is middleware? –CORBA –Java (EJB) –DCOM –Compare the different middleware Get to know one middleware (CORBA) really well Middleware in embedded systems –What are the criteria?