Question

DISTRIBUTED COMPUTING WITH XML-RPC Description Common tasks in distributed computing applications often require the ability of...

DISTRIBUTED COMPUTING WITH XML-RPC Description 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 XML-RPC and Python. XML-RPC is a protocol used to call procedures, (i.e. 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 built-in 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. XML-RPC’s implementation in Python is found in the xmlrpc package. In this package, the required modules are xmlrpc.client and xmlrpc.server. Assignment 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 8000. 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 8000. Most of the time, however, this will work. Your server invocation must be in the following form: python server.py localhost 8000 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 24 hour format. I.e. 13:00:01 add(x,y) – returns the sum of x and y sub(x,y) – returns x – y mult(x,y) – returns x * y div(x,y) – returns x/y (be sure to handle the divid by 0 scenario) Client The client is to connect to the server using the server’s address and the port that the server is listening on (see above). It then will exercise each of the supported procedures using the values 8 and 6 for the values x and y respectively. Your client invocation must be in the following form: python client.py host_address host_port 8 6 where host_address and host_port 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 8 and the 6 are the values for x and y. Example Output Of Client: 8 * 6 is 48.0 8 / 6 is 1.3333333333333333 8 + 6 is 14.0 8 - 6 is 2.0 8 / 0 is Infinity 13:50:22?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

PYTHON CODES :

 class mult(x.y): def __init__(self,x,y): self.x=x self.y=y self.mult=x*y class div(x,y): def__init__(self,x.y): self.x=x self.y=y self.div=x/y class add(x,y): def__init__(self,x,y): self.x=x self.y=y self.add=x+y 
Add a comment
Know the answer?
Add Answer to:
DISTRIBUTED COMPUTING WITH XML-RPC Description Common tasks in distributed computing applications often require the ability of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I am doing an assignment for a class and need a little help trying to understand...

    I am doing an assignment for a class and need a little help trying to understand how to get started on this assignment. This is needing to be program in python and any help is greatly appreciated. Distributed Computing with XML-RPC Description 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 XML-RPC and Python....

  • Project Description In this project, you will be developing a multithreaded Web server and a simple...

    Project Description In this project, you will be developing a multithreaded Web server and a simple web client. The Web server and Web client communicate using a text-based protocol called HTTP (Hypertext Transfer Protocol). Requirements for the Web server The server is able to handle multiple requests concurrently. This means the implementation is multithreaded. In the main thread, the server listens to a specified port, e.g., 8080. Upon receiving an HTTP request, the server sets up a TCP connection to...

  • 1. Which of the following protocols is used by a client to send an email message?...

    1. Which of the following protocols is used by a client to send an email message? a. HTTP SMTP b. FTP d. RDP 2. What is the most common network topology today? a/Star c. Hub Ring d. Mesh 3. A client/server network is the simplest network model. a/ True O False 4. Which client server application allows an administrator to control a remote computer, but does not encrypt or secure the communication between client and server? A Telnet C. Remote...

  • I need help with this assignment, please; Programming Assignment 3: UDP Pinger Lab In this lab,...

    I need help with this assignment, please; Programming Assignment 3: UDP Pinger Lab In this lab, you will study a simple Internet ping server written in the Java language, and implement a corresponding client. The functionality provided by these programs is similar to the standard ping programs available in modern operating systems, except that they use UDP rather than Internet Control Message Protocol (ICMP) to communicate with each other. (Java does not provide a straightforward means to interact with ICMP.)...

  • 166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls...

    166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls and Os) goes in and out of a machine physically is through the NIC (network interface card). The way network communication goes in and out of a machine logically though, is through a program or service. A service is a program that runs in the background, independent of a logon, that provides functionalities to a system. Windows client machines, for instance, have a Workstation...

  • ?=55 completing the attached table using thr given topology IPV4 & IPV6 Default G/W IPV4 Network...

    ?=55 completing the attached table using thr given topology IPV4 & IPV6 Default G/W IPV4 Network Interface IP Interface Device IPV6 GUP 10.20.232/27 2002:DB8:?:A::/64 Name N/A 10.20.2.33/27 G0/0 RI N/A 2002:DB8:?:A::1/64 IC-20.cr S0/0/0 DC) S0/0/1 G0/0 R2 SO/0/0 S0/0/1 G0/0 R3 S0/0/0 S0/0/1 Management SWI port Management SW2 port Management SW3 port FastEthernet0 PCO PC1 FastEthernet0 FastEthernet0 PC2 PC3 FastEthernet0 Web- FastEthernet0 Server ALogical Physical x 1569. y 213 X LAN-1 1020.?32/27 2002:DB8.?A:/64 SW-1 Web Server R1 WAN-2 1.1.2.4/30 2004...

  • The ability of computers to perform complex tasks is built on combining simple commands into control...

    The ability of computers to perform complex tasks is built on combining simple commands into control structures. Of these control structures, blocks, while loop, the do..while loop, and the for loop.   A block is the simplest type of structured statement. Its purpose is simply to group a sequence of statements into a single statement. The format of a block is: { } Here are two examples of blocks: { System.out.print("The answer is "); System.out.println(ans); } // This block exchanges the...

  • OpenSooq Assignment - Software Engineer Given two strings input of printable text, a and b ....

    OpenSooq Assignment - Software Engineer Given two strings input of printable text, a and b . let the edit distance between a and b is least number of operations needed to transform a to b, write php code that calculate edit distance using: 1. hamming distance that only have substitute operations (ex. substitute letter X with letter Y). 2. Levenshtein distance: that have 3 possible operators: insert, delete or substitution operations the function should consider all possibilities but should not...

  • In the normal course of performing their responsibilities, auditors often conduct audits or reviews of the...

    In the normal course of performing their responsibilities, auditors often conduct audits or reviews of the items listed below. Requirements a. For the 12 examples, state the most likely type of auditor (CPA, GAO, IRS, or internal to perform each. b. In each example, state the type of audit (financial statement audit, operational audit, or compliance audit). (450) coa) ca Start with example 1. through 5. and (a) identify the most likely type of auditor (CPA, GAO, IRS, or internal)...

  • Exercise #1: Write a C program that contains the following steps (make sure all variables are...

    Exercise #1: Write a C program that contains the following steps (make sure all variables are int). Read carefully each step as they are not only programming steps but also learning topics that explain how functions in C really work. Ask the user for a number between 10 and 99. Write an input validation loop to make sure it is within the prescribed range and ask again if not. Commenting out the existing coding, write the code to divide a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT