diff --git a/README.md b/README.md index 9e3710dd456879e751e6c43214aa1e5081fd0240..8c4b536f75512d08e1cd6c3c449e15a3f2793497 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/exercises/python-rpc/client.py b/exercises/python-rpc/client.py new file mode 100644 index 0000000000000000000000000000000000000000..49d07ca284d50218fcbf999eb6e3cfa4f0055799 --- /dev/null +++ b/exercises/python-rpc/client.py @@ -0,0 +1,8 @@ +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) diff --git a/exercises/python-rpc/server.py b/exercises/python-rpc/server.py new file mode 100644 index 0000000000000000000000000000000000000000..316a35fbae999630122634a432828db228689095 --- /dev/null +++ b/exercises/python-rpc/server.py @@ -0,0 +1,13 @@ +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() diff --git a/slides/images/RMI.webp b/slides/images/RMI.webp new file mode 100644 index 0000000000000000000000000000000000000000..f4b3bdba4d1689a7214b5cc3b5962ab44d1d163a Binary files /dev/null and b/slides/images/RMI.webp differ diff --git a/slides/images/RPC.webp b/slides/images/RPC.webp new file mode 100644 index 0000000000000000000000000000000000000000..5000c9b91c36d720d349f011ff2d4f5cf37a5aa2 Binary files /dev/null and b/slides/images/RPC.webp differ diff --git a/slides/pages/recap.md b/slides/pages/recap.md index 65dab975ca3618291d304db43c955a3ea81ceeda..e308aaf8fc135808cb4b2a9d3d481fc660e86b5f 100644 --- a/slides/pages/recap.md +++ b/slides/pages/recap.md @@ -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> -->