This is a simple gRPC-based task manager service that allows clients to submit tasks, check their status, and stream status updates in real-time.
The project consists of three main components:
proto/
: Contains the protobuf definition for theTaskManager
service, including all RPC methods and message types.server/
: The gRPC server implementation that handles task submissions and status updates.client/
: A client application that demonstrates how to interact with theTaskManager
service.
The TaskManager
service is defined in proto/taskmanager.proto
and exposes the following RPC methods:
SubmitTask(TaskRequest) returns (TaskResponse)
: Submits a new task to the manager.CheckTaskStatus(StatusRequest) returns (StatusResponse)
: Retrieves the current status of a specific task.StreamTaskStatus(StatusRequest) returns (stream StatusResponse)
: Streams status updates for a task in real-time.
To run this project, you need to have Go and Docker installed on your system.
-
Clone the repository:
git clone <repository-url> cd task-manager
-
Build the Docker containers:
docker-compose build
To run the server and client, use the following command:
docker-compose up
The client will automatically connect to the server, submit a new task, and stream its status updates. You will see logs from both the server and client in your terminal.
This project is instrumented with OpenTelemetry for tracing and metrics.
- Jaeger: To view traces, open your browser and navigate to
http://localhost:16686
. - Prometheus: To view metrics, open your browser and navigate to
http://localhost:9090
.
You can also run the server and client manually without Docker.
Server:
go run server/server.go
Client:
go run client/client.go