A simple distributed application for vegetable sales system using Go language and Remote Procedure Calls (RPC).
Server will maintain a file which keeps records of different available vegetables including price per kg and available amount of kg for each vegetable. The server has following functions.
- Query the file and output names of all available vegetables.
- Output the price per kg of a given vegetable.
- Output the available amount of kg for a given vegetable.
- Add new vegetable to the file with price per kg and among of kg.
- Update the price or available amount of a given vegetable.
Accordingly, clients can use server functions to do the following tasks.
- Receive a list of all available vegetables and display.
- Get the price per kg of a given vegetable and display.
- Get the available amount of kg of a given vegetable and display.
- Send a new vegetable name to the server to be added to the server file.
- Send new price or available amount for a given vegetable to be updated in the server file.
- go run server.go
- go run client.go