# Golem VM Discovery Server
The Discovery Server acts as the central hub for the Golem Network, enabling requestors to find providers with matching resources.
## Installation
```bash
pip install golem-vm-discovery
```
## Running the Server
The Discovery Server comes with sensible defaults and can be run immediately after installation:
```bash
golem-discovery
```
The server will start with the following default configuration:
- Listen on all interfaces (0.0.0.0) port 9001
- Store data in SQLite at ~/.golem/discovery/discovery.db
- Rate limit to 100 requests per minute per IP
- Clean up expired advertisements every minute
- Require provider advertisement refresh every 5 minutes
### Configuration
All settings have built-in defaults and can be optionally overridden using environment variables:
```bash
# Override only what you need:
# Change the port
GOLEM_DISCOVERY_PORT=8000
# Enable debug mode
GOLEM_DISCOVERY_DEBUG=true
# Use a different database location
GOLEM_DISCOVERY_DATABASE_DIR="/custom/path"
```
### Default Settings
| Setting | Default | Environment Variable | Description |
|---------|---------|---------------------|-------------|
| Host | 0.0.0.0 | GOLEM_DISCOVERY_HOST | Listen interface |
| Port | 9001 | GOLEM_DISCOVERY_PORT | Listen port |
| Debug | false | GOLEM_DISCOVERY_DEBUG | Enable debug mode |
| Database Dir | ~/.golem/discovery | GOLEM_DISCOVERY_DATABASE_DIR | Database directory |
| Database Name | discovery.db | GOLEM_DISCOVERY_DATABASE_NAME | Database filename |
| Rate Limit | 100 | GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE | Requests per minute per IP |
| Ad Expiry | 5 | GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES | Minutes until ads expire |
| Cleanup Interval | 60 | GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS | Seconds between cleanups |
## API Endpoints
- `GET /health` - Health check endpoint
- `GET /api/v1/advertisements` - List available providers
- `POST /api/v1/advertisements` - Register a provider
## Environment Variables
All settings can be configured through environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| GOLEM_DISCOVERY_HOST | Server host | 0.0.0.0 |
| GOLEM_DISCOVERY_PORT | Server port | 9001 |
| GOLEM_DISCOVERY_DEBUG | Enable debug mode | false |
| GOLEM_DISCOVERY_DATABASE_DIR | Database directory | ~/.golem/discovery |
| GOLEM_DISCOVERY_DATABASE_NAME | Database filename | discovery.db |
| GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE | Rate limit per IP | 100 |
| GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES | Advertisement TTL | 5 |
| GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS | Cleanup interval | 60 |
## Development
To run the server in development mode:
```bash
GOLEM_DISCOVERY_DEBUG=true golem-discovery
```
This will enable auto-reload on code changes and more detailed logging.
Raw data
{
"_id": null,
"home_page": "https://github.com/cryptobench/vm-on-golem",
"name": "golem-vm-discovery",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "golem, discovery, resource-matching, marketplace, decentralized",
"author": "Phillip Jensen",
"author_email": "phillip+vm-on-golem@golemgrid.com",
"download_url": "https://files.pythonhosted.org/packages/48/0b/540f01550c613de92b127ca1d5a6d92b9061e1ea56a4f893270e5421be8a/golem_vm_discovery-0.1.21.tar.gz",
"platform": null,
"description": "# Golem VM Discovery Server\n\nThe Discovery Server acts as the central hub for the Golem Network, enabling requestors to find providers with matching resources.\n\n## Installation\n\n```bash\npip install golem-vm-discovery\n```\n\n## Running the Server\n\nThe Discovery Server comes with sensible defaults and can be run immediately after installation:\n\n```bash\ngolem-discovery\n```\n\nThe server will start with the following default configuration:\n- Listen on all interfaces (0.0.0.0) port 9001\n- Store data in SQLite at ~/.golem/discovery/discovery.db\n- Rate limit to 100 requests per minute per IP\n- Clean up expired advertisements every minute\n- Require provider advertisement refresh every 5 minutes\n\n### Configuration\n\nAll settings have built-in defaults and can be optionally overridden using environment variables:\n\n```bash\n# Override only what you need:\n\n# Change the port\nGOLEM_DISCOVERY_PORT=8000\n\n# Enable debug mode\nGOLEM_DISCOVERY_DEBUG=true\n\n# Use a different database location\nGOLEM_DISCOVERY_DATABASE_DIR=\"/custom/path\"\n```\n\n### Default Settings\n\n| Setting | Default | Environment Variable | Description |\n|---------|---------|---------------------|-------------|\n| Host | 0.0.0.0 | GOLEM_DISCOVERY_HOST | Listen interface |\n| Port | 9001 | GOLEM_DISCOVERY_PORT | Listen port |\n| Debug | false | GOLEM_DISCOVERY_DEBUG | Enable debug mode |\n| Database Dir | ~/.golem/discovery | GOLEM_DISCOVERY_DATABASE_DIR | Database directory |\n| Database Name | discovery.db | GOLEM_DISCOVERY_DATABASE_NAME | Database filename |\n| Rate Limit | 100 | GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE | Requests per minute per IP |\n| Ad Expiry | 5 | GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES | Minutes until ads expire |\n| Cleanup Interval | 60 | GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS | Seconds between cleanups |\n\n## API Endpoints\n\n- `GET /health` - Health check endpoint\n- `GET /api/v1/advertisements` - List available providers\n- `POST /api/v1/advertisements` - Register a provider\n\n## Environment Variables\n\nAll settings can be configured through environment variables:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| GOLEM_DISCOVERY_HOST | Server host | 0.0.0.0 |\n| GOLEM_DISCOVERY_PORT | Server port | 9001 |\n| GOLEM_DISCOVERY_DEBUG | Enable debug mode | false |\n| GOLEM_DISCOVERY_DATABASE_DIR | Database directory | ~/.golem/discovery |\n| GOLEM_DISCOVERY_DATABASE_NAME | Database filename | discovery.db |\n| GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE | Rate limit per IP | 100 |\n| GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES | Advertisement TTL | 5 |\n| GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS | Cleanup interval | 60 |\n\n## Development\n\nTo run the server in development mode:\n\n```bash\nGOLEM_DISCOVERY_DEBUG=true golem-discovery\n```\n\nThis will enable auto-reload on code changes and more detailed logging.\n",
"bugtrack_url": null,
"license": null,
"summary": "VM on Golem Discovery Service - Central hub for provider discovery and resource matching",
"version": "0.1.21",
"project_urls": {
"Homepage": "https://github.com/cryptobench/vm-on-golem",
"Repository": "https://github.com/cryptobench/vm-on-golem"
},
"split_keywords": [
"golem",
" discovery",
" resource-matching",
" marketplace",
" decentralized"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f08144c2b057e2753855183b77450db97978153a081e85aa0470abc3d75357e5",
"md5": "e7fa17d3599e31188dca9162a5e9ac05",
"sha256": "563664e060ed650e30e8dd575df473c3369853baa590dc07edfb3d055af99142"
},
"downloads": -1,
"filename": "golem_vm_discovery-0.1.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7fa17d3599e31188dca9162a5e9ac05",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 11352,
"upload_time": "2025-02-20T23:54:47",
"upload_time_iso_8601": "2025-02-20T23:54:47.915024Z",
"url": "https://files.pythonhosted.org/packages/f0/81/44c2b057e2753855183b77450db97978153a081e85aa0470abc3d75357e5/golem_vm_discovery-0.1.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "480b540f01550c613de92b127ca1d5a6d92b9061e1ea56a4f893270e5421be8a",
"md5": "61b3947d9c600b1b9fcd082f60c2ee81",
"sha256": "1345cf36fd14efdc171bd5aa0b81c21b6c36a4403948224cebf2eea0ba3091c2"
},
"downloads": -1,
"filename": "golem_vm_discovery-0.1.21.tar.gz",
"has_sig": false,
"md5_digest": "61b3947d9c600b1b9fcd082f60c2ee81",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 8593,
"upload_time": "2025-02-20T23:54:49",
"upload_time_iso_8601": "2025-02-20T23:54:49.622438Z",
"url": "https://files.pythonhosted.org/packages/48/0b/540f01550c613de92b127ca1d5a6d92b9061e1ea56a4f893270e5421be8a/golem_vm_discovery-0.1.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-20 23:54:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cryptobench",
"github_project": "vm-on-golem",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "golem-vm-discovery"
}