Skip to content
Snippets Groups Projects
Commit 26da5a73 authored by Chao Zhan's avatar Chao Zhan
Browse files

update slides and add python rpc example

parent e3344889
No related branches found
No related tags found
No related merge requests found
......@@ -5,5 +5,5 @@ This branch contains all materials for the 9th tutorial session.
## Agenda
- Assignment's solution presentation
- Recap & Discussion: P2P, Cloud Computing
- Recap & Discussion: RMI, P2P, Cloud Computing
- Q&A
import xmlrpc.client
server = xmlrpc.client.ServerProxy("http://localhost:8000")
with server as proxy:
result = proxy.square(5)
print("[RPC] The square of 5 is:", result)
result = proxy.cube(5)
print("[RPC] The cube of 5 is:", result)
import xmlrpc.server
class MyServer:
def square(self, x):
return x * x
def cube(self, x):
return x * x * x
server = xmlrpc.server.SimpleXMLRPCServer(("localhost", 8000))
print("Listening on port 8000...")
server.register_instance(MyServer())
server.serve_forever()
slides/images/RMI.webp

18.6 KiB

slides/images/RPC.webp

19.2 KiB

......@@ -9,6 +9,40 @@ A possible approach:
- Use different threads to handle different clients as well as different tasks
- Use different ports to handle different services
See live demo.
---
title: RPC
---
## Remote Procedure Call (RPC)
**Remote Procedure Call (RPC)** is a distributed computing technique in which a computer program calls a procedure (subroutine or service) to execute in a different address space than its own.
<div class="container flex justify-center mt-5">
<img src="/images/RPC.webp" class="block w-md"/>
</div>
**Language Specific**:
- Java Remote Method Invocation (RMI)
- Go RPC
- ...
---
title: RMI
---
## Java Remote Method Invocation (RMI)
It is a mechanism that allows an object residing in one system (JVM) to access/invoke an object running on another JVM.
<div class="container flex justify-center mt-5">
<img src="/images/RMI.webp" class="block w-md"/>
</div>
**Note:** RMI is a Java-specific implementation of RPC.
---
title: P2P
---
......@@ -29,7 +63,6 @@ title: Cloud Computing
---
# Cloud Computing
Discuss the following topics and explain those concepts in your own words to your teammates:
<br/>
......@@ -38,6 +71,3 @@ Discuss the following topics and explain those concepts in your own words to you
- What are the **deployment models** of cloud computing?
- What are the key technologies involved in cloud computing?
<!-- <div class="container flex justify-center"> -->
<!-- <img src="/images/http-header.png" class="block w-md"/> -->
<!-- </div> -->
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment