+ All Categories
Home > Documents > Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware...

Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware...

Date post: 31-Dec-2015
Category:
Upload: margaretmargaret-lucas
View: 249 times
Download: 3 times
Share this document with a friend
10
Chapter 8 Chapter 8 -3 : Distributed -3 : Distributed Systems Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware Coordination-based middleware Jini Jini Grids Grids 1
Transcript
Page 1: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

Chapter 8Chapter 8-3 : Distributed -3 : Distributed SystemsSystems

Distributed systemsDistributed systems Document-based middlewareDocument-based middleware Coordination-based middlewareCoordination-based middleware JiniJini GridsGrids

1

Page 2: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

2

Distributed SystemsDistributed Systems

Figure 8-29. Comparison of three Figure 8-29. Comparison of three kinds of multiple CPU systems.kinds of multiple CPU systems.

Page 3: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

3

MiddlewareMiddleware

Figure 8-30. Positioning of middleware in a distributed Figure 8-30. Positioning of middleware in a distributed system.system.

MiddlewareMiddleware layer provides certain data structures and layer provides certain data structures and operations that allow processes and users on far-flung operations that allow processes and users on far-flung machines to interoperate in a consistent waymachines to interoperate in a consistent way

In a sense, middleware is like the operating system of a In a sense, middleware is like the operating system of a distributed systemdistributed system

Page 4: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

4

Document-Based Document-Based Middleware (1) Middleware (1)

Figure 8-35. The Web is a big directed graph of Figure 8-35. The Web is a big directed graph of documents.documents.

The web is a distributed system which looks The web is a distributed system which looks like a giant collection of hyperlinked documentslike a giant collection of hyperlinked documents

It is fundamently a client-server systemIt is fundamently a client-server system

Page 5: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

5

Document-Based Document-Based Middleware (2)Middleware (2)

When the browser gets the pageWhen the browser gets the pagehttp://www.minix3.org/doc/faq.html.http://www.minix3.org/doc/faq.html.

1.1. The browser asks DNS for the IP address of www.minix3.org.The browser asks DNS for the IP address of www.minix3.org.

2.2. DNS replies with 130.37.20.20.DNS replies with 130.37.20.20.

3.3. The browser makes a TCP connection to port 80 on The browser makes a TCP connection to port 80 on 130.37.20.20.130.37.20.20.

4.4. It then sends a request asking for the file doc/faq.html.It then sends a request asking for the file doc/faq.html.

5.5. The www.acm.org server sends the file doc/faq.html.The www.acm.org server sends the file doc/faq.html.

6.6. The TCP connection is released.The TCP connection is released.

7.7. The browser displays all the text in doc/faq.html.The browser displays all the text in doc/faq.html.

8.8. The browser fetches and displays all images in doc/faq.html.The browser fetches and displays all images in doc/faq.html.

Page 6: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

6

Coordination-Based Coordination-Based Middleware (1)Middleware (1)

LindaLinda A system for communication and synchronizationA system for communication and synchronization Independent processes communicate via an abstract tuple spaceIndependent processes communicate via an abstract tuple space A tuple is a structure of one or more fields, each of which is a A tuple is a structure of one or more fields, each of which is a

value of some type supported by the base languagevalue of some type supported by the base language

Figure 8-40. Three Linda tuples.Figure 8-40. Three Linda tuples.

Page 7: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

7

Matching TuplesMatching Tuples

A match occurs if the following three A match occurs if the following three conditionsconditions are all met:are all met:

1.1. The template and the tuple have the The template and the tuple have the same number of fields.same number of fields.

2.2. The types of the corresponding The types of the corresponding fields are equal.fields are equal.

3.3. Each constant or variable in the Each constant or variable in the template matches its tuple field.template matches its tuple field.

Page 8: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

8

Implementing a General Implementing a General Semaphore in LindaSemaphore in Linda

Post k notes as the initial value of a Post k notes as the initial value of a semaphoresemaphore

do K times postnote(‘s’)do K times postnote(‘s’) Removenote is equivalent to Removenote is equivalent to waitwait and and

postnote to postnote to signalsignal

Page 9: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

9

JiniJiniJini clients and services communicate and Jini clients and services communicate and synchronize using JavaSpacessynchronize using JavaSpaces which are which are modeled on the Linda tuple spacemodeled on the Linda tuple space..

Methods defined in a JavaSpace:Methods defined in a JavaSpace:

1.1.WriteWrite: put a new entry into the JavaSpace.: put a new entry into the JavaSpace.

2.2.ReadRead: copy an entry that matches a template : copy an entry that matches a template out of the JavaSpace.out of the JavaSpace.

3.3.TakeTake: copy and remove an entry that : copy and remove an entry that matches a template.matches a template.

4.4.NotifyNotify: notify the caller when a matching : notify the caller when a matching entry is written.entry is written.

Page 10: Chapter 8-3 : Distributed Systems Distributed systems Distributed systems Document-based middleware Document-based middleware Coordination-based middleware.

GridsGrids A A gridgrid is a large, geographically dispersed, and is a large, geographically dispersed, and

usually heterogeneous collection of machines usually heterogeneous collection of machines connected by a private network or the internet, connected by a private network or the internet, and which offers a set of services to its usersand which offers a set of services to its users

The motivation for building a grid is that when The motivation for building a grid is that when an organization did not need all of its computing an organization did not need all of its computing power another organization could use the power another organization could use the excess power for its needs and vice versaexcess power for its needs and vice versa

A popular middleware in the grid world is the A popular middleware in the grid world is the Globus toolkitGlobus toolkit which provides a framework for which provides a framework for users to share computers, files, and other users to share computers, files, and other resources for building distributed applicationsresources for building distributed applications

10


Recommended