Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 950 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 950 Bytes

CS 361 Sprint 2

Image Path Lookup Microservice: This microservice receives a string containing the name of a plant and returns the path to an image of that plant.The microservice communicates via ZeroMQ sockets.

Socket Setup

To set up the socket, use the following code:

context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:5555")

Request Data

To request data from the microservice, use the following code as a template. The 'request' variable will be the name of the plant the microservice will look up.

request = input("Enter valid plant name: ")
socket.send_string(request)

Receive Data

To receive data from the microservice, use the following code after the code above for requesting the data.

data = socket.recv_string()

UML Diagram

image