Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DISTRIBUTED COMPUTING WITH XML - RPC ASSIGNMENT INSTRUCTIONS OVERVIEW Common tasks in distributed computing applications often require the ability of one computer to be able
DISTRIBUTED COMPUTING WITH XMLRPC ASSIGNMENT INSTRUCTIONS
OVERVIEW
Common tasks in distributed computing applications often require the ability of one computer to be able to remotely invoke a procedure on another computer in the distributed system. This assignment introduces this idea further using XMLRPC and Python.
XMLRPC is a protocol used to call procedures, ie methods or functions by one computer client on another computer server Its name results from fact that XML is used to encode the procedure calls. The means used to transport the XML from the client to the server is HTTP While Python has builtin support for this functionality, it is important to note that support is not limited to Python but extends to most high level languagesadd. This is inherent in the design since the encoding is generic XML and transport is HTTP
Finally, there are many ways to implement such functionality. For Python, while outside the scope of this course, the interested reader should explore projects such as Pyro, RPyC and Fabric. XMLRPCs implementation in Python is found in the xmlrpc package. In this package, the required modules are xmlrpcclient and xmlrpcserver.
INSTRUCTIONS
This assignment requires you to develop two Python programs. One is a client, the other is the server.
Server
The server should register x procedures that the client will be able to call. It will then bind to the address localhost and port This is the address and port that the server will listen to for requests. Note that if you have binding errors, you may use another port as your computer may have an application that is using Most of the time, however, this will work. Your server invocation must be in the following form:
python server.py localhost
These procedures to be supported are as follows:
name returns the name of the server which is passed on the commandline during server invocation
help returns a list of procedures that the server supports
servertime returns the current time at the server in hour format. I.e::
addxy returns the sum of x and y
subxy returns x y
multxy returns x y
divxy returns xy be sure to handle the divid by scenario
Client
The client is to connect to the server using the servers address and the port that the server is listening on see above It then will exercise each of the supported procedures using the values and for the values x and y respectively. Your client invocation must be in the following form:
python client.py hostaddress hostport
where hostaddress and hostport are the address and port that the server is listening on If you are using a single computer for server and client computers just use localhost for the address and the port used above. The and the are the values for x and y
Example Output Of Client:
is
is
is
is
is Infinity
::
Test your code completely. At each step of the test take a screen shot and embed it into a Word document. Submit the Word document to the appropriate assignment.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started