Group Communication using Ensemble. 2 Group Communication - Overview Group Communication as a middleware, providing an application with: Group membership.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Introduction 1-1 Chapter 3 Transport Layer Intro and Multiplexing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
Multiplexing/Demux. CPSC Transport Layer 3-2 Multiplexing/demultiplexing application transport network link physical P1 application transport network.
Final Presentation Liat Ben-Ami Yonathan Perez Instructor: Roy Mitrany.
Ensemble Group Communication Middleware. 2 Group Communication - Overview Ensemble – a group communications implementation for research
2: Application Layer 1 Socket programming Socket API r introduced in BSD4.1 UNIX, 1981 r explicitly created, used, released by apps r client/server paradigm.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 Java Networking – Part I CS , Spring 2008/9.
1 Overview r Socket programming with TCP r Socket programming with UDP r Building a Web server.
Java Socket Support Presentation by: Lijun Yuan Course Number: cs616.
CSE/EE 461 Getting Started with Networking. Basic Concepts  A PROCESS is an executing program somewhere.  Eg, “./a.out”  A MESSAGE contains information.
Distributed Systems 2006 Group Membership * *With material adapted from Ken Birman.
TCP/IP Protocol Suite 1 Chapter 11 Upon completion you will be able to: User Datagram Protocol Be able to explain process-to-process communication Know.
TCP Socket Programming CPSC 441 Department of Computer Science University of Calgary.
Lab 1 Bulletin Board System Farnaz Moradi Based on slides by Andreas Larsson 2012.
2: Application Layer 1 Socket Programming TCP and UDP.
Building an ftp client and server using sockets we now know enough to build a sophisticated client/server application!  ftp  telnet  smtp  http.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 3 Inter-process Communication.
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
CS4273: Distributed System Technologies and Programming I Lecture 5: Java Socket Programming.
Network Layer Programing Connection-Oriented Sockets SWE 344 Internet Protocols & Client Server Programming.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
NET0183 Networks and Communications Lecture 31 The Socket API 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints from.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
SPREAD TOOLKIT High performance messaging middleware Presented by Sayantam Dey Vipin Mehta.
Sockets API Overview Sockets with UDP Sockets with TCP Fast Sockets (Fast UDP) IP Multicasting.
RGEC MEERUT(IWT CS703) 1 Java Networking RGEC Meerut.
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
Chapter 4: Interprocess Communication‏ Pages
7/26/ Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java.
Distributed Systems Concepts and Design Chapter 4.
IBM TSpaces Lab 1 Introduction. Summary TSpaces Overview Basic Definitions Basic primitive operations Reading/writing tuples in tuplespace HelloWorld.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Lecture 9 Network programming. Manipulating URLs URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet.
Li Tak Sing COMPS311F. Case study: consumers and producers A fixed size buffer which can hold at most certain integers. A number of producers which generate.
UDP Client-Server. The Socket Class The Socket class provides a set of methods and properties for network communications. The Socket class allows you.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Networking COMP # 22.
 2003 Joel C. Adams. All Rights Reserved. Calvin CollegeDept of Computer Science(1/11) Java Sockets and Simple Networking Joel Adams and Jeremy Frens.
Connectionless Sockets SWE 344 Internet Protocols & Client Server Programming.
CS390- Unix Programming Environment CS 390 Unix Programming Environment Java Socket Programming.
IP multicasting SWE 344 Internet Protocols & Client Server Programming.
1 CSCD 330 Network Programming Spring 2014 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright Lecture 7 Application.
CSE/EE 461 Getting Started with Networking. 2 Basic Concepts A PROCESS is an executing program somewhere. –Eg, “./a.out” A MESSAGE contains information.
Socket Programming Lab 1 1CS Computer Networks.
Server-Side Java Mapping Copyright © ZeroC, Inc. Ice Programming with Java 6. Server-Side Java Mapping.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
Part 4: Network Applications Client-server interaction, example applications.
Distributed systems (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
Group Communication Theresa Nguyen ICS243f Spring 2001.
TCP/IP Protocol Stack IP Device Drivers TCPUDP Application Sockets (Gate to network) TCP: –Establish connection –Maintain connection during the communication.
4.6 Multicast at the Network Layer Introduction: The Internet multicast abstraction and multicast groups The IGMP Protocol Multicast.
1 CSCD 330 Network Programming Fall 2013 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright Lecture 8a Application.
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 11 Omar Meqdadi Department of Computer Science and Software Engineering University.
ZOOKEEPER. CONTENTS ZooKeeper Overview ZooKeeper Basics ZooKeeper Architecture Getting Started with ZooKeeper.
SPL/2010 Reactor Design Pattern 1. SPL/2010 Overview ● blocking sockets - impact on server scalability. ● non-blocking IO in Java - java.niopackage ●
Computer Science 320 Introduction to Cluster Computing.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
Lecture 6 Threads Erick Pranata
Echo Networking COMP
Sockets and Beginning Network Programming
Block 14 Group Communication (Multicast)
Socket Programming in C
CNT 4007C Project 2 Good morning, everyone. In this class, we will have a brief look at the project 2. Project 2 is basically the same with project 1.
46 to 1500 bytes TYPE CODE CHECKSUM IDENTIFIER SEQUENCE NUMBER OPTIONAL DATA ICMP Echo message.
Multiplexing/Demux.
Socket Programming with UDP
Presentation transcript:

Group Communication using Ensemble

2 Group Communication - Overview Group Communication as a middleware, providing an application with: Group membership / member status Support for various reliable communication and synchronization schemes

3 Introducing Ensemble Ensemble – a group communications implementation for research Modular design – provides various micro-layers that may be stacked to form a higher-level protocol Examples of layers: Total – totally ordered messages Suspect – failure detection Drop – randomized message dropping Privacy – encryption of application data Frag – fragmentation and reassembly of long messages

4 Ensemble – Graphical layout Application Layers OS Application Layers OS UDP/ IP Multicast

5 Ensemble C# (JAVA) API - Components The C# (Java) API for Ensemble uses five public classes: View – describes a group membership view JoinOps – specifications for group name and layer stack Member – Status of member within the group Connection - implements the actual socket communication between the client and the server. Message - describes a message received from Ensemble. A Message can be: a new View, a multicast message, a point-to-point message, a block notification, or an exit notification.

6 Creating a C# (Java) application on top of Ensemble Step 1: Start a connection Connection conn = new Connection (); conn.Connect(); Upon connecting, can call the following methods of object conn : public bool Poll(); //non-blocking public Message Recv(); //blocking

7 Creating a C# (Java) application on top of Ensemble cont. Step 2: Create a JoinOps object: JoinOps jops = new JoinOps(); jops.group_name = “MyProgram" ; The public String field properties initially contains the default layers Gmp:Switch:Sync:Heal:Frag:Suspect:Flow:Slander

8 Creating a C# (Java) application on top of Ensemble cont. Step 3: Create a Member object: Member memb = new Member(conn); Using the Member object, you can call the following methods: // Join a group with the specified options. public void Join(JoinOps ops); // Leave a group. public void Leave(); // Send a multicast message to the group. public void Cast(byte[] data);

9 Creating a Java application on top of Ensemble cont. // Send a point-to-point message to a list of members. public void Send(int[] dests, byte[] data); // Send a point-to-point message to the specified group member. public void Send1(int dest, byte[] data); // Report group members as failure-suspected. public void Suspect(int[] suspects); // Send a BlockOk public void BlockOK();

10 block rec’d / blockOK sent Member.java – State diagram Pre Joining join view rec’d Normal leave Leaving exit received Left Blocked view rec’d

11 View info Step 4: Upon joining and receiving a VIEW-type message, look at msg.view: public class View { public int nmembers; public String version; /** The Ensemble version */ public String group; /** group name */ public String proto; /** protocol stack in use */ public int ltime; /** logical time */ public boolean primary; /** this a primary view? */ public String parameters;/** params used for this group */ public String[] address; /** list of comm addresses */ public String[] endpts; /** list of endpoints in view */ public String endpt; /** local endpoint name */ public String addr; /** local address */ public int rank; /** local rank */ public String name; /** My name. This does not change thoughout the lifetime of this member. */ public ViewId view_id; /** view identifier */ }

12 Example - mtalk public static void Main(string[] args) { conn = new Connection (); conn.Connect(); JoinOps jops = new JoinOps(); jops.group_name = "CS_Mtalk" ; // Create the endpoint memb = new Member(conn); memb.Join(jops); MainLoop(); }

13 Mtalk, continued static void MainLoop() { // Open a special thread to read from the console Mtalk mt = new Mtalk(); Thread input_thr = new Thread(new ThreadStart(mt.run)); input_thr.Start(); while(true) { // Read all waiting messages from Ensemble while (conn.Poll()) { Message msg = conn.Recv(); switch(msg.mtype) {……………..} } Thread.Sleep(100); }

14 Mtalk, continued switch(msg.mtype) { case UpType.VIEW: // Got new View break; case UpType.CAST: // Got broadcast message break; case UpType.SEND: // Got point to point message break; case UpType.BLOCK: memb.BlockOk(); break; case UpType.EXIT: break; }

15 Mtalk, continued // A method for the input-thread void run () { while(true) { // Parse an input line and perform the required operation string line = Console.ReadLine(); lock (conn) { if (memb.current_status == Member.Status.Normal) memb.Cast(System.Text.Encoding.ASCII.GetBytes(line)); else Console.WriteLine("Blocked currently, please try again later"); } Thread.Sleep(100); }

16 Protocol Example – Total Ordering while (msg = conn.Recv()) { switch(msg.mtype) { case UpType.VIEW: am_coord = (msg.view.rank == 0); counter = 0; break; case UpType.CAST: if (am_coord){ memb.Cast(msg.data); //NOTE:Cast does not deliver to me Console.WriteLine(“ Message”+(counter++)+”:”+new String(msg.data) ); } break; } Can you identify a problem? (Hint: message ordering by coord)