1 / 39

introduction to distributed computing

Distributed Software Systems . 2. About this Class. Focus: Fundamental concepts underlying distributed computing systems designing and writing moderate-sized distributed software applicationsPrerequisites: CS 571 (Operating Systems)CS 706 (Concurrent Software)Strong programming skills in Java or C/C .

elina
Télécharger la présentation

introduction to distributed computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Distributed Software Systems 1 Introduction to Distributed Computing Prof. Elizabeth White Distributed Software Systems CS 707

    2. Distributed Software Systems 2

    3. Distributed Software Systems 3 What you will learn Issues that arise in the development of distributed systems and software Middleware technology Threads, sockets RPC, Java RMI/CORBA Javaspaces (JINI), SOAP/Web Services/.NET, Enterprise Javabeans Not discussed in class, but you can become more familiar with these technologies

    4. Distributed Software Systems 4 Logistics Grade: 60% projects, 40% exams Slides, assignments, reading material on class web page http://www.cs.gmu.edu/~white/cs707/ Two small (2-3 week) programming assignments + one larger project (3-4 weeks) To be done individually Use any platform; all the necessary software will be available on IT&E lab computers

    5. Distributed Software Systems 5 Readings Textbook: Distributed Systems: Principles and Paradigms - Tannenbaum & van Steen, Second Edition Some lectures based on other materials Research literature Each lecture/chapter will be supplemented with articles from the research literature Links on class web site

    6. Distributed Software Systems 6 Centralized vs. Distributed Computing

    7. Distributed Software Systems 7 Centralized vs. Distributed Computing

    8. Distributed Software Systems 8 Example Distributed systems Internet ATM (bank) machines Intranets/Workgroups Computing landscape will soon consist of ubiquitous network-connected devices The network is the computer

    9. Distributed Software Systems 9 A typical portion of the Internet

    10. Distributed Software Systems 10 Computers in a Distributed System Workstations: computers used by end-users to perform computing Server machines: computers which provide resources and services Personal Assistance Devices: handheld computers connected to the system via a wireless communication link.

    11. Distributed Software Systems 11 Goals/Benefits Resource sharing Scalability Fault tolerance and availability Performance Parallel computing can be considered a subset of distributed computing

    12. Distributed Software Systems 12 Components of Distributed Software Systems

    13. Distributed Software Systems 13 Challenges(Differences from Local Computing)

    14. Distributed Software Systems 14 Challenges contd Need for openness Open standards: key interfaces in software and communication protocols need to be standardized Security Denial of service attacks Mobile code Scalability Transparency

    15. Distributed Software Systems 15 Scalability Becoming increasingly important because of the changing computing landscape Key to scalability: decentralized algorithms and data structures No machine has complete information about the state of the system Machines make decisions based on locally available information Failure of one machine does not ruin the algorithm There is no implicit assumption that a global clock exists

    16. Distributed Software Systems 16 Computers in the Internet

    17. Distributed Software Systems 17 Computers vs. Web servers in the Internet

    18. Distributed Software Systems 18 Scaling Techniques (1)

    19. Distributed Software Systems 19 Scaling Techniques (2)

    20. Distributed Software Systems 20 Transparency in Distributed Systems

    21. Distributed Software Systems 21 Transparency in Distributed Systems

    22. Distributed Software Systems 22 Fundamental/Abstract Models A fundamental model captures the essential ingredients that we need to consider to understand and reason about a systems behavior Addresses the following questions What are the main entities in the system? How do they interact? What are the characteristics that affect their collective and individual behavior?

    23. Distributed Software Systems 23 Fundamental/Abstract Models Three models Interaction model Reflects the assumptions about the processes and the communication channels in the distributed system Failure model Distinguish between the types of failures of the processes and the communication channels Security Model Assumptions about the principals and the adversary

    24. Distributed Software Systems 24 Interaction Models Synchronous Distributed Systems: a system in which the following bounds are defined The time to execute each step of a process has an upper and lower bound Each message transmitted over a channel is received within a known bounded delay Each process has a local clock whose drift rate from real time has a known bound Asynchronous distributed system Each step of a process can take an arbitrary time Message delivery time is arbitrary Clock drift rates are arbitrary Some implications In a synchronous system, timeouts can be used to detect failures Impossible to detect failures or reach agreement in an asynchronous system

    25. Distributed Software Systems 25 Omission and arbitrary failures

    26. Distributed Software Systems 26 Timing failures

    27. Distributed Software Systems 27 Middleware

    28. Distributed Software Systems 28 Middleware: Goals Middleware handles heterogeneity Higher-level support Make distributed nature of application transparent to the user/programmer Remote Procedure Calls RPC + Object orientation = CORBA Higher-level support BUT expose remote objects, partial failure, etc. to the programmer JINI, Javaspaces Scalability

    29. Distributed Software Systems 29 Communication Patterns Client-server Group-oriented/Peer-to-Peer Applications that require reliability, scalability Function-shipping/Mobile Code/Agents Postscript, Java

    30. Distributed Software Systems 30 Distributed applications Applications that consist of a set of processes that are distributed across a network of machines and work together as an ensemble to solve a common problem In the past, mostly client-server Resource management centralized at the server Peer to Peer computing represents a movement towards more truly distributed applications

    31. Distributed Software Systems 31 Clients invoke individual servers

    32. Distributed Software Systems 32 A service provided by multiple servers

    33. Distributed Software Systems 33

    34. Distributed Software Systems 34 A distributed application based on peer processes

    35. Distributed Software Systems 35 Readings Chapter 1 of textbook (Tannenbaum) Chapters 1, 2 of Coulouris, Kindberg, Dollimore (on reserve in library) A Note on Distributed Computing Waldo, Wyant, Wollrath, Kendall Link on class web page

    36. Distributed Software Systems 36 C Sockets: client int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; portno = atoi(argv[2]); sockfd = socket(AF_INET, SOCK_STREAM, 0); server = gethostbyname(argv[1]); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(portno); printf("Please enter the message: "); fgets(buffer,255,stdin); n = write(sockfd,buffer,strlen(buffer)); n = read(sockfd,buffer,255); printf("%s\n",buffer);

    37. Distributed Software Systems 37 C Sockets: server int sockfd, newsockfd, portno, clilen, n; char buffer[256]; struct sockaddr_in serv_addr, cli_addr; sockfd = socket(AF_INET, SOCK_STREAM, 0); portno = atoi(argv[1]); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(portno); listen(sockfd,5); clilen = sizeof(cli_addr); newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); n = read(newsockfd,buffer,255); printf("Here is the message: %s\n",buffer); n = write(newsockfd,"I got your message",18);

    38. Distributed Software Systems 38 Java Sockets: Client public class EchoClient { public static void main(String[] args) throws IOException { Socket echoSocket = null; PrintWriter out = null; BufferedReader in = null; try { echoSocket = new Socket("cs1.gmu.edu", 4444); out = new PrintWriter(echoSocket.getOutputStream(), true); in = new BufferedReader(new InputStreamReader( echoSocket.getInputStream())); } catch (UnknownHostException e) { System.err.println("Don't know about host: cs1."); System.exit(1); } catch (IOException e) { System.err.println("Couldn't get I/O for " + "the connection to: cs1."); System.exit(1); } BufferedReader stdIn = new BufferedReader( new InputStreamReader(System.in)); String userInput; while ((userInput = stdIn.readLine()) != null) { out.println(userInput); System.out.println("echo: " + in.readLine()); } out.close(); in.close(); stdIn.close(); echoSocket.close(); } }

    39. Distributed Software Systems 39 HTTP session cs1 ~% telnet osf1.gmu.edu 80 Trying 129.174.1.13... Connected to mason.gmu.edu. Escape character is '^]'. GET /~white/ HTTP/1.0 HTTP/1.1 200 OK Date: Thu, 25 Jan 2007 14:22:04 GMT Server: Apache/2.2.2 (Unix) mod_ssl/2.2.2 OpenSSL/0.9.8b Last-Modified: Wed, 01 Jun 2005 14:39:04 GMT ETag: "52ac7-26-151d3200" Accept-Ranges: bytes Content-Length: 38 Connection: close Content-Type: text/html <html> <body> testing </body> </html> Connection to mason.gmu.edu closed by foreign host.

More Related