Implementation: A Framework for Distributed Computing of Matrix Multiplication Using One Client and One Server in Python Programming Language and you can use either RMI or any version of RPC for client/server communication.
In this task, the client gets two square matrices from keyboard and it sends two matrices to the server. Server calculates the product of two square matrices and returns the result to the client and the client prints the result. Note that the size of square matrices is not fixed in your program.
Hint*: If you are going to use RPC for communication, you can use examples of Math (using ONC RPC or C/RPC) or calc (using Go/RPC) as the basis of your work.
# Program to multiply two matrices using list comprehension
# take a 3x3 matrix
A = [[12, 7, 3],
[4, 5, 6],
[7, 8, 9]]
# take a 3x4 matrix
B = [[5, 8, 1, 2],
[6, 7, 3, 0],
[4, 5, 9, 1]]
# result will be 3x4
result = [[sum(a * b for a, b in zip(A_row, B_col))
for B_col in zip(*B)]
for A_row in A]
for r in result:
print(r)
Implementation: A Framework for Distributed Computing of Matrix Multiplication Using One Client and One Server in...