Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Computing

Similar presentations


Presentation on theme: "Distributed Computing"— Presentation transcript:

1 Distributed Computing
In the Java Environment

2 Distributed Computing: Introduction
Defn: Applications composed of collaborating parts that may operate in different environments. Different hosts Different operating systems Different locations Different languages

3 "Pure" Java methods for distributed computing
Socket-based communication Remote method invocation (RMI)

4 Java to non-Java distributed computing
Java database connectivity (JDBC) Common Object Request Broker Architecture (CORBA)

5 Socket-based Java Distributed Computing
Two distributed components communicate via a two-way connection between "sockets" that each establishes. Kinds of sockets: Server sockets Receive requests for connections from clients. Client sockets Send and receive data.

6 Socket-based Java Distributed Computing
Server sockets Created only with Java apps, not applets. Client sockets Client side Can be created by Java apps and applets. Server side In response to connection requests from clients.

7 Server Sockets Unique port number for each.
S.S. must be running on server host in order for connection to a client to be established. Server socket is an instance of the ServerSocket class (589). accept() close()

8 Client Sockets One is created after the server socket is contacted by a client, to allow the server application to communicate with the client that made the contact. There is a client socket at both ends. Instance of the Socket class getInputStream() getOutputStream() close()

9 Remote Method Invocation (RMI)
Interhost communications are made transparent to the programmer. Objects residing on different hosts are treated as if they are all on the same host. JVM handles connections between hosts, and data transmission.

10 RMI Architecture Participants
Server. Service contract. Client. Stub. Automatically generated by RMI compiler. Resides on same host as client. Skeleton. Resides on same host as server.

11 Remote Method Invocation (RMI)
A remote method invocation: Invocation of a method of a remote object. Looks same as normal method invocation. Objects accessible from a remote host (called remote objects) implement a marker interface called java.rmi.Remote.

12 Java Database Connectivity (JDBC)
Allows Java apps to access relational databases. .Provides a Structured Query Language (SQL) interface. JDBC drivers provide communication between Java apps and databases.

13 Java Database Connectivity (JDBC)
Structured Query Language interface. Common SQL commands: INSERT DELETE UPDATE SELECT CREATE DROP ALTER

14 Common Object Request Broker Architecture (CORBA)
Standardized by Object Management Group (OMG) Provides interoperability between apps written in different languages. Uses Interface Definition Language (IDL).

15 CORBA Architecture Components
Server. Service contract. Client. Stub. Skeleton.

16 CORBA Object Request Broker
Allows object communication independent of specific platforms. Shields client from need to know server's object location, language, or operating system.


Download ppt "Distributed Computing"

Similar presentations


Ads by Google