Distributed Programming CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

RPC Robert Grimm New York University Remote Procedure Calls.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
1 Distributed Systems Distributed Objects & Remote Invocation CORBA Dr. Sunny Jeong. Mr. Colin Zhang With Thanks.
The road to reliable, autonomous distributed systems
CORBA - Common Object Request Broker Architecture.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
A brief look at CORBA. What is CORBA Common Object Request Broker Architecture developed by OMG Combine benefits of OO and distributed computing Distributed.
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.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Communication in Distributed Systems –Part 2
Web Services CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
1 Lecture 22 George Koutsogiannakis Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
Common Object Request Broker Architecture (CORBA) CS-328.
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.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
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.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
Remote Procedure Call Andrew Whitaker CSE451. Remote Procedure Call RPC exposes a programming interface across machines: interface PriceService { Price.
CSCI 6962: Server-side Design and Programming Web Services.
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.
1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong. With Thanks to.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
CORBA/IDL Common Object Resource Broker Architecture (CORBA) Interface Definition Language (IDL) Object Management Group (OMG) ( Specification.
CORBA – Command Line CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
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.
PolyORB Versatile Middleware for Interoperable Critical Systems PolyORB Versatile Middleware for Interoperable Critical Systems Presentation cover page.
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
CORBA – Eclipse CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Web Services An Introduction Copyright © Curt Hill.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
.NET Mobile Application Development XML Web Services.
(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.
Java Distributed Computing
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
Chapter 5 Remote Procedure Call
WEB SERVICES.
Web Services-JAX-RPC JAX-RPC enables a Web Service endpoint to be developed using either a Java Servlet or Enterprise JavaBeans (EJB) component model.
Java Distributed Computing
Unit – 5 JAVA Web Services
CORBA Alegria Baquero.
Inventory of Distributed Computing Concepts and Web services
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
Inventory of Distributed Computing Concepts
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
WebServices Using JAX-RPC
Distributed System using Web Services
Distributed System using Web Services
Presentation transcript:

Distributed Programming CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L

Outline USC CSCI 201L2/23 ▪D▪Distributed Programming ▪R▪RMI ▪C▪CORBA ▪W▪Web Services ▪T▪Test Yourself

Remote Procedure Calls ▪Distributed Computing is also known as a Remote Procedure Call (RPC) ▪An RPC is an inter-process communication mechanism that allows a program to execute a procedure in another address space ›This could be another computer or another program running within the same computer ▪There are many different RPC frameworks ›Remote Method Invocation (RMI) ›Common Object Request Broker Architecture (CORBA) ›Web Services ›XML-RPC ›JSON-RPC ›Microsoft.NET Remoting ›Microsoft RPC ›Many others USC CSCI 201L3/23 Distributed Programming

Message Passing ▪When a procedure is invoked in another address space (which typically would be on another computer), data needs to be passed to it ▪This is accomplished through message passing ▪Message passing is as rudimentary as just passing data in an agreed-upon protocol ›Each RPC framework has its own message passing protocol, and unfortunately, they are not typically interchangeable ▪If the message passing protocol is generic enough, the programs communicating with each other do not have to be written in the same language ›This usually requires variable types to be standardized USC CSCI 201L4/23 Distributed Programming

RPC Runtime Lifecycle ▪Client code calls a procedure in the client stub just as it would call a local procedure ▪The client stub packs the parameters into a message ›Packing the parameters is called marshalling ▪The client stub sends the message to the server ▪The server stub receives the message ▪The server stub unpacks the parameters from the message ›Unpacking the parameters is called unmarshalling ▪The server stub calls the server’s procedure as it would call a local procedure ▪The response from the RPC is similar USC CSCI 201L5/23 Distributed Programming

RPC Synchronization ▪RPCs can be either blocking or non-blocking ›A blocking RPC will wait for a response from the server before continuing ›A non-blocking RPC will continue executing while waiting for a response from the server This can be implemented either with multi-threading or parallel programming USC CSCI 201L6/23 Distributed Programming

Outline USC CSCI 201L7/23 ▪D▪Distributed Programming ▪R▪RMI ▪C▪CORBA ▪W▪Web Services ▪T▪Test Yourself

RMI Overview ▪RMI is a Java-implementation of RPC referred to as a distributed object application ▪An RMI server typically creates some remote objects, makes references to those objects accessible, and waits for clients to invoke methods on those objects ▪An RMI client obtains a remote reference to one or more remote objects on a server and invokes methods on them ›RMI clients can locate remote objects through an RMI registry, assuming the remote objects have registered with the RMI server ▪The details of remote communication between server and client are handled by RMI ›Remote communication looks like regular Java method invocations to the programmer ▪The client can pass a class to a remote server and have it execute methods on that class USC CSCI 201L8/23 Remote Method Invocation

RMI Dynamic Code Loading ▪RMI has the ability to download the definition of an object’s class if the class is not defined in the client’s JVM ›All of the types and behaviors of an object can be transmitted to a remote JVM ›New types and behaviors can be introduced into a remote JVM, thus dynamically extending the behavior of an application USC CSCI 201L9/23 Remote Method Invocation

Outline USC CSCI 201L10/23 ▪D▪Distributed Programming ▪R▪RMI ▪C▪CORBA ▪W▪Web Services ▪T▪Test Yourself

Interface Definition Language ▪An interface definition language (IDL) provides a specification to describe a software component’s interface ›This is usually a language-independent way to specify a shared interface to allow two programs to communicate with each other ▪IDLs are commonly used in remote procedure calls (RPCs) when the languages used for the client and server programs can be different ›The mapping between variables in each of the languages to a common format must be defined in the IDL USC CSCI 201L11/23 CORBA

IDLs ▪Object Management Group (OMG) IDL ›Used by CORBA ▪RESTful Service Description Language (RSDL) ▪JSON Web Service Protocol (JSON-WSP) ▪Web Service Description Language (WSDL) ▪Is there an IDL for RMI? ›No because RMI uses Java code on both the client and server, only requiring serialization of Java objects USC CSCI 201L12/23 CORBA

IDL Process ▪The first step to creating a distributed application is to define the IDL ▪This will define the objects and variables that are able to be transmitted between the client and the server during a method invocation ▪The methods, return types, and parameters also are defined in the IDL ▪IDL defines a list of variable types ›Integers, floating point values, characters, strings, booleans, bytes, structures, unions, enumerations, arrays, or a generic type USC CSCI 201L13/23 CORBA

IDL Example sum.idl 1 module SumApp { 2 interface SumServer { 3 long sum(in long a, in long b); 4 }; 5 }; ▪A module corresponds to a package in Java or a namespace in C++ ▪An interface corresponds to an interface in Java or an abstract class in C++ ▪The method in the middle will get compiled to an abstract method/virtual function ▪Here is the compiled Java code for the above IDL: SumServerOperations.java 1 package SumApp; 2 3 /** 4 * SumApp/SumServerOperations.java. 5 * Generated by the IDL-to-Java compiler (portable), version "3.2" 6 * from sum.idl 7 * Sunday, April 12, :20:27 PM PDT 8 */ 9 10 public interface SumServerOperations { 11 int sum (int a, int b); 12 } // interface SumServerOperations USC CSCI 201L14/23 CORBA

CORBA Overview ▪The Common Object Request Broker Architecture (CORBA) is the Object Management Group’s (OMG) open, vendor-independent architecture and infrastructure that computer applications use to work together over networks › ▪CORBA is operating system- and language- independent ▪CORBA uses IDL to map programming language specifics to OMG standards, with mappings from IDL to C, C++, C++11, Java, Ruby, COBOL, Smalltalk, Ada, Lisp, Python, and IDLscript defined USC CSCI 201L15/23 CORBA

CORBA Request ▪CORBA clients communicate with an IDL stub, which is automatically generated from the IDL file ▪CORBA servers communicate with an IDL skeleton, which is automatically generated from the IDL file ▪The Object Request Broker (ORB) in the middle performs the communication and passes the data along in a standardized format from the stub to the skeleton USC CSCI 201L16/23 CORBA

Outline USC CSCI 201L17/23 ▪D▪Distributed Programming ▪R▪RMI ▪C▪CORBA ▪W▪Web Services ▪T▪Test Yourself

Web Services Overview ▪Web services are client and server applications that communicate over HTTP to implement RPCs ›They are language- and platform-independent ›Data is transmitted in a standardized XML format ▪Big Web Services ›Java API for XML Web Services (JAX-WS) ›Use XML messages following Simple Object Access Protocol (SOAP) ›Operations offered by the service are include in the Web Services Description Language (WSDL) ▪RESTful Web Services ›Java API for RESTful Web Services (JAX-RS) ›No requirement of XML messages or WSDL service ▪Additional information can be found at USC CSCI 201L18/23 Web Services

JAX-WS ▪Server side ›Developer specifies the web service operations by defining methods in an interface ›Create one or more classes that implement those interfaces ›Create a WSDL document to let clients know the web services that are exposed ▪Client side ›Create a proxy, which is a local object representing the service ›Create a program that invokes methods on the proxy ▪JAX-WS will generate and parse the SOAP messages and convert the API class to and from SOAP USC CSCI 201L19/23 Web Services

JAX-RS ▪Representational State Transfer (REST) is an architectural style of client-server applications centered around the transfer of resources through requests and responses using Uniform Resource Identifiers (URIs) ›A REST resource might be XML, HTML, plain text, PDF, JPEG, JSON, or other types ›This resource can be retrieved, updated, or deleted based on permissions ›REST uses HTTP, which is stateless, but state can be maintained with cookies, URI rewriting, and hidden form fields › USC CSCI 201L20/23 Web Services

JAX-WS vs JAX-RS ▪JAX-WS is used in enterprise applications with advanced Quality of Service (QoS) requirements ›Supports the WS-* set of protocols, providing standards for security and reliability (through SOAP) ▪JAX-RS is used for web applications using the REST architectural pattern ›Stateless operations (can withstand server restart) ›Scalability ›Architectural simplicity (use off the shelf components) ›Resources can be accessed using a variety of formats, so it is not limited solely to SOAP USC CSCI 201L21/23 Web Services

Outline USC CSCI 201L22/23 ▪D▪Distributed Programming ▪R▪RMI ▪C▪CORBA ▪W▪Web Services ▪T▪Test Yourself

Test Yourself ▪If the client was in C++ and the server was in Java, which RPC would you recommend using? ▪If the client and server were both in Java, which RPC would you recommend using? ▪If the network administrator didn’t want to open any additional ports through the firewall, which RPC would you recommend using? ▪If the data to transmit was in a PDF, which RPC would you recommend using? USC CSCI 201L23/23 Web Services