Chapter 2: Communications

Slides:



Advertisements
Similar presentations
SOAP.
Advertisements

Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
CCNA – Network Fundamentals
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
C# and Windows Programming Application Domains and Remoting.
Distributed components
Interprocess Communications
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Review For Midterm.
Introduction to Web Database Processing
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
OCT1 Principles From Chapter One of “Distributed Systems Concepts and Design”
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 (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
EEC-681/781 Distributed Computing Systems Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
What Is TCP/IP? The large collection of networking protocols and services called TCP/IP denotes far more than the combination of the two key protocols.
Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir.
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 3 Inter-process Communication.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Distributed Systems: Concepts and Design Chapter 1 Pages
Information Management NTU Interprocess Communication and Middleware.
Distributed Systems Principles and Paradigms Chapter 02 Communication 00 – 1.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Chapter 4: Interprocess Communication‏ Pages
Distributed Systems Concepts and Design Chapter 4.
1 Networking Chapter Distributed Capabilities Communications architectures –Software that supports a group of networked computers Network operating.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Interprocess.
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
Distributed Computing A Programmer’s Perspective.
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Interprocess Communications
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Chapter 4: Inter-process Communications
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Kemal Baykal Rasim Ismayilov
What is SOAP? Luciano Piccoli. SOAP – Simple Object Access Protocol  SOAP is an XML based protocol to let software components and applications communicate.
Distributed systems (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
.NET Mobile Application Development XML Web Services.
Introduction to Distributed Systems and CORBA Slides for CSCI 3171 Lectures E. W. Grundke.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Distributed Computing, M. L. Liu 1 Interprocess Communications Mei-Ling L. Liu.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
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.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Internet and Distributed Application Services
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Layered Architectures
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Distributed Systems Bina Ramamurthy 11/30/2018 B.Ramamurthy.
Distributed Systems Bina Ramamurthy 12/2/2018 B.Ramamurthy.
Chapter 15 – Part 2 Networks The Internal Operating System
WEB SERVICES From Chapter 19, Distributed Systems
Block 2: Interprocess Communications
Distributed Systems Bina Ramamurthy 4/22/2019 B.Ramamurthy.
Remote invocation (call)
Presentation transcript:

Chapter 2: Communications STIJ5014 – Distributed Systems

Contents Introduction Communication Protocols External Data Representation and Marshalling Client/server Communication Group Communication

Introduction

Introduction Review of the basic concepts in networking Open System Interconnection (OSI) Reference Model Created by International Organization for Standardization (ISO) Encourage the development of protocol standards that would meet the requirements of open systems 8 challenges in developing distributed systems (Chapter 1): Heterogeneity Openness Security Scalability Failure handling Concurrency Transparency Quality of service TCP/IP Model Transmission Control Protocol (TCP)/Internet Protocol (IP)  Network standards that define the Internet

Communication Protocols How computers communicate? « » Message passing a form of communication between objects, processes or other resources used in distributed computing 2 types of message passing Synchronous both send and receive are blocking operations Asynchronous send operation is non- blocking Process 1/ Process 2/ Synchronous message passing systems require the sender and receiver to wait for each other while transferring the message. In asynchronous communication the sender and receiver do not wait for each other and can carry on their own computations while transfer of messages is being done. Source: http://www.defit.org/message-passing/ Message Passing Interface (MPI) Standards: http://www.mpi-forum.org Send Receive

Communication Protocols Port Socket Communications among processes are accomplished between ports A computer has 216 possible ports Each port correspond to a single receiving process, however a process may involve more than one ports Ports require a software abstraction to run processes that is called sockets Message are sent between a pair of sockets Each socket is associated with a transport protocol that is either TCP or UDP

Communication Protocols Sockets and ports message agreed port any port socket IP address = 138.37.88.249 IP address = 138.37.94.248 other ports client server

Communication Protocols Socket Programming Most programming languages provide socket programming supports E.g., Java, C++, C, Python, Tutorial: https://www.youtube.com/watch?v=aEDV0Wlw XTs http://www.tutorialspoint.com/java/java_netwo rking.htm

Communication Protocols

Communication Protocols

External Data Representation and Marshalling

External Data Representation How data are represented and how they are transferred?

External Data Representation How data are converted into an acceptable form? An agreed standard for the representation of data structures and primitive values Allows data to be transferred between different kinds of computer systems Data structure must be converted to a sequence of bytes before transmission and rebuilt on arrival 8 challenges in developing distributed systems (Chapter 1): Heterogeneity Openness Security Scalability Failure handling Concurrency Transparency Quality of service

External Data Representation 3 approaches to external data representation: CORBA CDR Java Object Serialization XML Marshalling/Encoding The process of taking a collection of data items and assembling them into a form suitable for transmission in a message Unmarshalling/Decoding the process of disassembling a collection of data on arrival to produce an equivalent collection of data items at the destination

External Data Representation CORBA Common Data Representation (CDR) A transfer syntax that allows programs written in different programming languages work together in a client/server environment Representation of structured/primitive data types during remote invocation of objects in CORBA. What is Common Object Request Broker Architecture (CORBA) See http://www.omg.org/gettingstarted/corbafaq.htm For more information on CORBA, see http://www.omg.org/gettingstarted/corbafaq.htm

External Data Representation CORBA Common Data Representation (CDR) Short (16 bit) Long (32 bit) Unsigned short Unsigned long Float(32 bit) Double(64 bit) Char Boolean(TRUE,FALSE) Octet(8 bit) Any(can represent any basic or constructed type) Primitive types Composite types Sequence String Array Struct Enumerated union

External Data Representation CORBA Common Data Representation (CDR) Example: struct with value {‘Smith’, ‘London’, 1934}

External Data Representation Java Object Serialization A mechanism where an object can be represented as a sequence of bytes that includes the object's data as well as information about the object's type and the types of data stored in the object Tutorial on Java Object Serialization http://www.tutorialspoint.com/java/java_serialization.htm Serialization is the activity of flattening object or a related set of objects in a serial form suitable for transmitting in a message. Deserialization is the activity of restoring the state of an object or a set of objects from their serialized form

External Data Representation Java Object Serialization Example, the Java class equivalent to the Person struct (of CORBA CDR) Public class Person implements Serializable { Private String name; Private String place; Private int year; Public Person(String aName ,String aPlace, int aYear) { name = aName; place = aPlace; year = aYear; } //followed by methods for accessing the instance variables

External Data Representation Java Object Serialization

External Data Representation Extensible Markup Language (XML) XML is a mark up language that was defined by the WWW Consortium (W3C) for general use of web. Mark up language refers to a textual encoding that represents both a text and details as to its structure or its appearance It is used to enable clients to communicate with web services and for defining the interfaces and other properties of web services. XML data items are tagged with “markup” strings. The tags are used to describe the logical structure of the data and to associate attribute-value pairs with logical structure

External Data Representation Extensible Markup Language (XML) Extensible – users can define their own tags. If a document is intended to be used by more than one application, the names of the tags must be agreed between them Advantage of XML Binary data representation is not required Disadvantage of XML Longer processing time Try writing XML - www.w3schools.com/xml/default.asp

External Data Representation Extensible Markup Language (XML) XML elements and attributes: Element: a portion of character data surrounded by matching start and end tags Attribute : a start tag may optionally include pairs of associated attribute name and values such as id=“123456789” <person id="123456789"> <name>Smith</name> <place>London</place> <year>1984</year> <!-- a comment --> </person >

External Data Representation Extensible Markup Language (XML) Parsing and well-formed documents Well-formed documents – matching tags and nested Example: <x>….<y>….</y>….</x> Visit this website to develop and parse your own XML http://www.xmlfiles.com/examples/tryit.asp?filename=note_pars ertest XML prolog prolog must be written in the first line of a XML document Example : <?xml version="1.0"?>

External Data Representation Extensible Markup Language (XML) XML namespaces A set of names for a collection of element types and attributes that is referenced by a URL. Any other XN documents can use an XML namespace by referring to its URL <person pers:id="123456789" xmlns:pers = "http://www.cdk5.net/person"> <pers:name> Smith </pers:name> <pers:place> London </pers:place > <pers:year> 1984 </pers:year> </person>

External Data Representation Extensible Markup Language (XML) XML Schemas Defines the elements and attributes that can appear in a document, how the elements are nested and the order and number of elements, and whether the element can empty or include text. <xsd:schema xmlns:xsd = URL of XML schema definitions > <xsd:element name= "person" type ="personType" /> <xsd:complexType name="personType"> <xsd:sequence> <xsd:element name = "name" type="xs:string"/> <xsd:element name = "place" type="xs:string"/> <xsd:element name = "year" type="xs:positiveInteger"/> </xsd:sequence> <xsd:attribute name= "id" type = "xs:positiveInteger"/> </xsd:complexType> </xsd:schema>

Client/Server Communication

Client/Server Communications Review of Chapter 1 Remote invocation in client/server communication

Client/Server Communications Review of Chapter 1 8 challenges in developing distributed systems (Chapter 1): Heterogeneity Openness Security Scalability Failure handling Concurrency Transparency Quality of service Remote invocation in client/server communication requires middleware Middleware Software which allows an application to interoperate with other software, without requiring the user to understand and code the low-level operations required to achieve interoperability

Client/Server Communications Middleware Middleware Client Server Remote invocation Middleware provides support for (some of): Naming, Location, Service discovery, Replication Protocol handling, Communication faults, QoS Synchronisation, Concurrency, Transactions, Storage Access control, Authentication

Client/Server Communications Middleware The earliest middleware is remote procedure call (RPC) An interprocess communication (IPC) mechanism that enables data exchange and invocation of functionality residing in a different process RPC Processes

Client/Server Communications Types of Middleware Middleware for Distributed Objects Middleware for Message Queues Middleware for Distributed Components Middleware for Web services Middleware for publish-subscribe systems Middleware peer-to peer

Client/Server Communications Database Middleware ODBC CORBA OLE-DB DCOM JDBC

Group Communication

Group Communication Multicast The pairwise exchange of messages is not the best model for a group communication A multicast operation is more appropriate Multicast operation is an operation that sends a single message from one process to each of the members of a group of processes. The simplest way of multicasting, provides no guarantees about message delivery or ordering.

Group Communication Fault tolerance based on replicated services Characteristics of Multicast Fault tolerance based on replicated services A replicated service consists of a group of servers. Client requests are multicast to all the members of the group, each of which performs an identical operation. Finding the discovery servers in spontaneous networking Multicast messages can be used by servers and clients to locate available discovery services in order to register their interfaces or to look up the interfaces of other services in the distributed system.

Group Communication Better performance through replicated data Characteristics of Multicast Better performance through replicated data Data are replicated to increase the performance of a service. Propagation of event notifications Multicast to a group may be used to notify processes when something happens.

Group Communication IP Multicast IP multicast is built on top of the Internet protocol, IP. IP multicast allows the sender to transmit a single IP packet to a multicast group. A multicast group is specified by class D IP address for which first 4 bits are 1110 in IPv4. The membership of a multicast group is dynamic. A computer belongs to a multicast group if one or more processes have sockets that belong to the multicast group. Please check out the following videos on Multicast: https://www.youtube.com/watch?v=AvbSMBKBZgY https://www.youtube.com/watch?v=1_4MOkjfX7I https://www.youtube.com/watch?v=sM0oQxYfbys

End of the Chapter