Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
RPC Robert Grimm New York University Remote Procedure Calls.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
6/13/2015B.Ramamurthy1 System Models Bina Ramamurthy (Based on Slides from CDK text)
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Introduction to Remote Method Invocation (RMI)
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
Web Services CS Web Services Internet-available services using XML messaging, for computer-computer interaction Not tied to any OS or language Self-describing:
Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts & Design (5 th Ed.). Essex: Addison-Wesley.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 9: Web Services.
Distributed Programming 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.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
Web Services An Introduction Copyright © Curt Hill.
1 RMI Russell Johnston Communications II. 2 What is RMI? Remote Method Invocation.
Java Distributed Object Model A remote object is one whose methods can be invoked from another JVM on a different host. It implements one or more remote.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 9 Web Services.
Remote Method Invocation Internet Computing Workshop Lecture 17.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Internet and Distributed Application Services
Chapter 4 Remote Method Invocation
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Sabri Kızanlık Ural Emekçi
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Chapter 5 Remote Procedure Call
WEB SERVICES.
MCA – 405 Elective –I (A) Java Programming & Technology
Unit – 5 JAVA Web Services
Remote Method Invocation
What is RMI? Remote Method Invocation
#01 Client/Server Computing
Edition 5, © Addison-Wesley 2012
Programming Models for Distributed Application
WEB API.
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Creating a Distributed System with RMI
Introduction to Web Services
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
$, $$, $$$ API testing Edition
Creating a Distributed System with RMI
Creating a Distributed System with RMI
Distributed Systems through Web Services
Remote Method Invocation
Creating a Distributed System with RMI
Chapter 46 Remote Method Invocation
WebServices Using JAX-RPC
Introduction to Web Services
Chapter 46 Remote Method Invocation
Distributed System using Web Services
WEB SERVICES From Chapter 19, Distributed Systems
An Introduction to Internetworking
Remote invocation (call)
Distributed System using Web Services
Creating a Distributed System with RMI
#01 Client/Server Computing
Presentation transcript:

Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy

Figure 5.1 Middleware layers Applications This chapter Remote invocation, indirect communication (and Chapter 6) Middleware Underlying interprocess communication primitives: layers Sockets, message passing, multicast support, overlay networks UDP and TCP Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Figure 5.10 Role of client and server stub procedures in RPC Request Reply Communication module dispatcher service client stub server stub procedure client process server process program Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Remote Method Invocation Remote Method Invocation (RMI) is Java’s implementation of object-to-object communication among Java objects to realize a distributed computing model. RMI allows us to distribute our objects on various machines, and invoke methods on the objects located on remote sites. 2/17/2019 B.Ramamurthy

RMI-based Distributed System 4. XYZ Implementation Client Host Server Host Client Stub interface uses implements 1. 2. 3. 5. 2/17/2019 B.Ramamurthy

Steps in RMI-based Application 1. Design the interface for the service. 2. Implement the methods specified in the interface. 3. Generate the stub and the skeleton. 4. Register the service by name and location. 5. Use the service in an application. 2/17/2019 B.Ramamurthy

Compile and Register Commands rmiregistry Finds object by name Stores object by name rmic 5. 3. 3. 2. XYZ Client Skeleton XYZ Implementation Stub 1. uses implements XYZ interface Client Host Server Host 2/17/2019 B.Ramamurthy

More Details Once the object (or service) is registered, a client can look up that service. A client (application) receives a reference that allows the client to use the service (call the method). Syntax of calling is identical to a call to a method of another object in the same program. 2/17/2019 B.Ramamurthy

Parameter Marshalling Transfer of parameters (or marshalling) is done by the RMI. Complex objects are streamed using Serialization. Byte-fication of an object. Implementation: Any object that allows serialization inherits Serlizable interface Serialization is an example of Marker interface 2/17/2019 B.Ramamurthy

Oracle Java RMI docs https://docs.oracle.com/javase/tutorial/rmi/overview.html 2/17/2019 B.Ramamurthy

Streaming URLs Using the openStream of java.net.URL class you can stream in the file spefied by an universal resource locator(url). It can be streamed into a buffer where it can be analyzed for information. Any number of urls can be streamed in. Unicast Communication : When you are interested in a particular remote site you will direct your net connection to that particular site using unicast. 2/17/2019 B.Ramamurthy

Web Services (Colouris) A web service provides a service interface enabling clients to interact with servers in a more general way than web browsers do. Clients access operations in the interface usually by XML messages over http. Or other architectural models such as REST and SOAP could access WS. WSDL provides additional details than for standard operation: for encoding, security, communication and location.

REST vs SOAP (midterm question?) Both are architectural styles and framework for creating web services in a client/server based distributed system. SOAP is application-specific and exposes its own set of operations for distributed application. REST on the other hand uses predefined set of standard operation for manipulating resources in a distributed systems. 2/17/2019 B.Ramamurthy

REST Roy Fielding’s dissertation: Apache Software Foundation co-founder. https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm Computer interact using standard operations on https: GET, POST, PUT, DELETE; You also provide the resource identifier to operate on. Payload can be formatted in HTML, XML or JSON, etc. B.Ramamurthy

REST Principles Client/server architecture Stateless Cacheable Layered system (intermediate server with specific functionality.. C/S may not be directly connected) Uniform interface 2/17/2019 B.Ramamurthy

Services, ports and bindings Service endpoint interface (SEI) or service endpoint that defines one or more operations that the web service offers. Access to an endpoint is provided by binding it to a protocol stack through a port. A port has an address that the client can use to communicate with the service and invoke its operations. An endpoint can be bound to different ports each offering a different suite of protocols for interaction.

Endpoint, Port and binding Web service endpoint Port1 port2 port3 Web services Client SOAP1.1 Over http SOAP 1.1 over https Other. Ex: ebXML over SMTP https 1.x transport soap1.1 messages

Summary We discussed designing a distributed system using RMI We also looked at RMI internal We also learned about marker interface, distributed garbage collection, object marshalling, registry, server-port binding, 2/17/2019 B.Ramamurthy