{"id":31706979,"url":"https://github.com/ehsaniara/joblet-proto","last_synced_at":"2026-01-29T20:07:30.330Z","repository":{"id":316003583,"uuid":"1056777066","full_name":"ehsaniara/joblet-proto","owner":"ehsaniara","description":"the Protobuf project for joblet https://github.com/ehsaniara/joblet","archived":false,"fork":false,"pushed_at":"2025-12-22T17:06:54.000Z","size":213,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-24T06:11:45.108Z","etag":null,"topics":["client","joblet","protobuf"],"latest_commit_sha":null,"homepage":"https://ehsaniara.github.io/joblet/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehsaniara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-14T19:27:08.000Z","updated_at":"2025-12-22T17:06:35.000Z","dependencies_parsed_at":"2025-09-22T06:26:28.163Z","dependency_job_id":"78e20f62-0785-4a76-a202-dfef78a43720","html_url":"https://github.com/ehsaniara/joblet-proto","commit_stats":null,"previous_names":["ehsaniara/joblet-proto"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/ehsaniara/joblet-proto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsaniara%2Fjoblet-proto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsaniara%2Fjoblet-proto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsaniara%2Fjoblet-proto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsaniara%2Fjoblet-proto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehsaniara","download_url":"https://codeload.github.com/ehsaniara/joblet-proto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsaniara%2Fjoblet-proto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","joblet","protobuf"],"created_at":"2025-10-08T23:49:12.701Z","updated_at":"2026-01-29T20:07:30.313Z","avatar_url":"https://github.com/ehsaniara.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Joblet Protocol Buffer Definitions\n\n[![CI](https://github.com/ehsaniara/joblet-proto/actions/workflows/ci-release.yml/badge.svg)](https://github.com/ehsaniara/joblet-proto/actions/workflows/ci-release.yml)\n[![Latest Release](https://img.shields.io/github/v/release/ehsaniara/joblet-proto)](https://github.com/ehsaniara/joblet-proto/releases/latest)\n\nThis repository contains the Protocol Buffer definitions for the Joblet distributed job execution system. These definitions are used to generate client libraries for multiple programming languages.\n\n## Quick Start\n\n### Option 1: Use Pre-built Language Bindings (Recommended)\n\nDownload language-specific bindings from our [releases](https://github.com/ehsaniara/joblet-proto/releases/latest):\n\n**Go**\n```bash\ncurl -L https://github.com/ehsaniara/joblet-proto/releases/latest/download/joblet-proto-go.tar.gz | tar xz\n# Use in your Go project\nimport pb \"joblet/api/gen\"\n```\n\n**Python**\n```bash\ncurl -L https://github.com/ehsaniara/joblet-proto/releases/latest/download/joblet-proto-python.tar.gz | tar xz\n# Use in your Python project\nimport joblet_pb2\nimport joblet_pb2_grpc\n```\n\n**Java**\n```bash\ncurl -L https://github.com/ehsaniara/joblet-proto/releases/latest/download/joblet-proto-java.tar.gz | tar xz\n```\n\n**Node.js/TypeScript**\n```bash\ncurl -L https://github.com/ehsaniara/joblet-proto/releases/latest/download/joblet-proto-node.tar.gz | tar xz\n```\n\n### Option 2: Generate From Source\n\nIf you prefer to generate the bindings yourself:\n\n1. **Install prerequisites:**\n   ```bash\n   # Install protoc\n   sudo apt-get install protobuf-compiler  # Ubuntu/Debian\n   brew install protobuf                   # macOS\n\n   # Install language-specific tools\n   make install-tools  # For Go tools\n   pip install grpcio-tools  # For Python\n   npm install -g grpc-tools  # For Node.js\n   ```\n\n2. **Generate bindings:**\n   ```bash\n   # Generate for specific language\n   ./generate.sh go\n   ./generate.sh python\n   ./generate.sh java\n   ./generate.sh node\n\n   # Or generate for all languages\n   ./generate.sh all\n   ```\n\n## Services\n\nThe Joblet protocol defines the following gRPC services:\n\n### Core Services (Port 50051 - joblet.proto)\n\n- **JobService** - Job lifecycle management (create, monitor, cancel, live log streaming)\n- **NetworkService** - Network configuration and management\n- **VolumeService** - Storage volume operations\n- **MonitoringService** - System metrics and health monitoring\n- **RuntimeService** - Runtime environment management\n\n### Persistence Services (Port 50052 - persist.proto)\n\n- **PersistService** - Historical log and metrics queries from disk storage\n\n## Architecture: Dual-Service Design\n\nJoblet uses a **CQRS (Command Query Responsibility Segregation)** architecture with two separate services:\n\n1. **joblet-core (Port 50051)** - Handles live operations:\n   - Running jobs\n   - Real-time log streaming\n   - Live metrics\n   - Job management (stop, cancel, delete)\n\n2. **joblet-persist (Port 50052)** - Handles historical queries:\n   - Historical log queries with filtering and pagination\n   - Historical metrics queries with time ranges\n   - Persistent storage queries\n\nThis separation allows for:\n- Independent scaling of command vs query workloads\n- Different optimization strategies for live vs historical data\n- Reduced load on the core service by offloading historical queries\n\n## Usage Examples\n\n### Connecting to Both Services\n\n**Go Example:**\n```go\nimport (\n    pb \"github.com/ehsaniara/joblet-proto/gen\"\n    persistpb \"github.com/ehsaniara/joblet-proto/gen/persist\"\n    \"google.golang.org/grpc\"\n)\n\n// Connect to joblet-core (Port 50051)\ncoreConn, _ := grpc.Dial(\"localhost:50051\", grpc.WithTransportCredentials(creds))\njobClient := pb.NewJobServiceClient(coreConn)\n\n// Connect to joblet-persist (Port 50052)\npersistConn, _ := grpc.Dial(\"localhost:50052\", grpc.WithTransportCredentials(creds))\npersistClient := persistpb.NewPersistServiceClient(persistConn)\n```\n\n**Python Example:**\n```python\nimport grpc\nimport joblet_pb2\nimport joblet_pb2_grpc\nimport persist_pb2\nimport persist_pb2_grpc\n\n# Connect to joblet-core (Port 50051)\ncore_channel = grpc.secure_channel('localhost:50051', credentials)\njob_client = joblet_pb2_grpc.JobServiceStub(core_channel)\n\n# Connect to joblet-persist (Port 50052)\npersist_channel = grpc.secure_channel('localhost:50052', credentials)\npersist_client = persist_pb2_grpc.PersistServiceStub(persist_channel)\n```\n\n### Hybrid Log Fetching Pattern\n\nThe recommended pattern is to fetch historical logs first, then stream live logs:\n\n```python\n# 1. Fetch historical logs from persist service\nrequest = persist_pb2.QueryLogsRequest(\n    job_id=\"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n    stream=persist_pb2.STREAM_TYPE_UNSPECIFIED  # Both stdout and stderr\n)\nfor log_line in persist_client.QueryLogs(request):\n    print(log_line.content.decode('utf-8'))\n\n# 2. Stream live logs from core service\nrequest = joblet_pb2.GetJobLogsReq(uuid=job_id)\nfor chunk in job_client.GetJobLogs(request):\n    print(chunk.payload.decode('utf-8'))\n```\n\n### Querying Historical Metrics\n\n```python\n# Query metrics with time range and pagination\nrequest = persist_pb2.QueryMetricsRequest(\n    job_id=\"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n    start_time=1633024800000000000,  # Unix nanoseconds\n    end_time=1633028400000000000,\n    limit=100\n)\nfor metric in persist_client.QueryMetrics(request):\n    print(f\"CPU: {metric.data.cpu_usage}, Memory: {metric.data.memory_usage}\")\n```\n\n## Related Projects\n\n- [Joblet](https://github.com/ehsaniara/joblet) - Server implementation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsaniara%2Fjoblet-proto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehsaniara%2Fjoblet-proto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsaniara%2Fjoblet-proto/lists"}