This project is a distributed numerical calculator system (addition and multiplication) built with gRPC. It features services written in different languages (Python, Go, and Java) that communicate with each other.
## Project Structure
*`/proto`: Contains the unified `.proto` contract file (`calculator.proto`).
*`/addition_service`: The Addition Service, written in **Python**.
*`/multiplication_service`: The Multiplication Service, written in **Go**.
*`/src/main/java`: The Client Gateway, written in **Java**.
*`README.md`: This documentation file.
## How to Run the Project
To run the full project, you must run all 3 components in **3 separate Terminal windows**, in order.
### 1. Run the Addition Service (Python)
1. Open a Terminal.
2. Navigate to the service directory:
```bash
cd addition_service
```
3. (First time only) Install dependencies:
```bash
pip install grpcio grpcio-tools
```
4. Run the server (it will keep running on port `50051`):
```bash
python server.py
```
**Expected output: `Addition Service server started on port 50051...`*
### 2. Run the Multiplication Service (Go)
1. Open a **new, separate** Terminal.
2. Navigate to the service directory:
```bash
cd multiplication_service
```
3. (First time only) Download dependencies:
```bash
go mod tidy
```
4. Run the server (it will keep running on port `50052`):
```bash
go run server.go
```
**Expected output: `Multiplication Service server started on port 50052...`*
### 3. Run the Java Gateway (Client)
1. Ensure both the Python and Go servers are running in their terminals.