分布计算 // create the socket 工 netAddress addr InetAddress getByName(our remote host)i Socket s new Socket(addr, 5000)i Inputstream in = s. getInputstream o)i Outputstream out s. getoutputstreamo)i // now we have Io streams to remote process; do something with them Institute of Computer Software 2021/2/5 18 Nanjing University
分布计算 2021/2/5 Institute of Computer Software Nanjing University 18 18 // create the socket InetAddress addr = InetAddress.getByName(“our.remote.host”); Socket s = new Socket(addr, 5000); InputStream in = s.getInputStream(); OutputStream out = s.getOutputStream(); // now we have IO streams to remote process; do something with them
分布计算 a Message passing libraries a PVM (Parallel virtual Machine), MPI Message Passing Interface a Send/Recv, Multicast n Virtual Shared Memory a OpenMP Institute of Computer Software 2021/2/5 Nanjing University
分布计算 Message Passing Libraries PVM (Parallel Virtual Machine), MPI (Message Passing Interface) Send/Recv, Multicast Virtual Shared Memory OpenMP 2021/2/5 Institute of Computer Software Nanjing University 19
分布计算 口远程过程调用(RPC, Remote Procedure c|) 口让应用程序开发者可以 象调用本地过程一样调用分布在远程节点上的过程 将结构化方法用于分布环境 实现上 ■ Request- Response消息传递模式 provides a function-oriented interface to socket-level communications(sits on top of the tCP/IP transport layer) Institute of Computer Software 2021/2/5 Nanjing University
分布计算 远程过程调用(RPC,Remote Procedure Call) 让应用程序开发者可以 ◼ 象调用本地过程一样调用分布在远程节点上的过程 ◼ 将结构化方法用于分布环境 实现上 ◼ Request – Response 消息传递模式 ◼ provides a function-oriented interface to socket-level communications (sits on top of the TCP/IP transport layer) 2021/2/5 Institute of Computer Software Nanjing University 20
最病 过摘要 口背景 a Why, what, How 般框架 口 CORBA 口 Java rm Institute of Computer Software 2021/2/5 Nanjing University
摘要 背景 Why, What, How 一般框架 CORBA Java RMI 2021/2/5 Institute of Computer Software Nanjing University 21
General Pattern for remote vocation Client Code S erver code Stub Skeleton Infrastructure Call. ● Serve marshal arguments receive data convert to network convert unmarshal format invoke method locate server marshal return value transmit data transmit data Distributed Systems Frameworks
Distributed Systems Frameworks 22 General Pattern for Remote Invocation Call: marshal arguments convert to network format locate server transmit data Client Code Stub Server Code Skeleton Infrastructure Serve: receive data convert & unmarshal invoke method marshal return value transmit data