{"id":19839340,"url":"https://github.com/redislabs/redis_info_provider","last_synced_at":"2025-05-01T19:30:18.436Z","repository":{"id":47237346,"uuid":"133494076","full_name":"RedisLabs/redis_info_provider","owner":"RedisLabs","description":"A Python framework for querying, caching, and serving to consumers info for an arbitrary number of redis-server instances.","archived":false,"fork":false,"pushed_at":"2024-05-22T05:56:12.000Z","size":68,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T17:01:32.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisLabs.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}},"created_at":"2018-05-15T09:37:48.000Z","updated_at":"2024-05-22T05:54:54.000Z","dependencies_parsed_at":"2024-05-22T06:42:02.312Z","dependency_job_id":"344f49a6-f627-4d85-9dfd-c91da87dd8be","html_url":"https://github.com/RedisLabs/redis_info_provider","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fredis_info_provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fredis_info_provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fredis_info_provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fredis_info_provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisLabs","download_url":"https://codeload.github.com/RedisLabs/redis_info_provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251932511,"owners_count":21667157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-12T12:21:52.602Z","updated_at":"2025-05-01T19:30:18.107Z","avatar_url":"https://github.com/RedisLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Info Provider\nA Python framework for querying, caching, and serving to consumers info for an arbitrary number of redis-server\ninstances (result of executing `INFO all` command).\n\n## Description\nGot a bunch of Redis instances you want clients to be able to query `INFO` for, but don't want them running commands\ndirectly on your instances? This is the module for you!\n\nFeature highlights:\n\n* Concurrent, single-threaded architecture leveraging [gevents](http://www.gevent.org).\n* Dynamically-adjusted per-instance polling intervals based on instance activity level. (Timing range is user-tweakable.)\n* Flexible API for info querying.\n* Compatible with both Python 2 and Python 3.\n\n## Getting Started\n\n### Installing\n\n\u003e This module supports Python 2/3 and has been tested with Python \u003e= 2.7.14 and Python \u003e= 3.6.4.\n\nDownload or clone the library source, `cd` into the download location, and run:\n\n```\npython setup.py install\n```\n\nor:\n\n```\npip install .\n```\n\n### Running the Tests\n\n```\npython setup.py test\n```\n\n### Packaging Source Distribution\n\n```\npython setup.py sdist\n```\n\n## Usage Examples\n\nThe framework comes with sample client/server applications to demonstrate its use. They use Python's included\n[xmlrpclib](https://docs.python.org/2/library/xmlrpclib.html) module and can be found in the `examples` directory:\n\n```\nexamples/\n  info_client.py\n  info_server.py\n```\n\nExperiment with the example programs and browse through their code to get an idea of how the system is designed to be\nused and its capabilities. A `--help` command-line flag is available for both to list their supported arguments.\n\n## Architecture\n\n![Architecture Diagram](docs/img/arch.png)\n\n### Shard Publisher\n\nThe central orchestrator component of the system. The shard publisher tracks the currently running shards in the system\nand serves as the repository for live shard objects. It also provides subscribable notification services for new shards\nbeing added to the system or live shards being removed from it.\n\n### Shard\n\nA class (`RedisShard`), instances of which represent tracked live shards. The shard object provides its *identifier* and\na way to obtain a working *connection* to that shard. It also stores the latest available *INFO* for the shard (once one\nis available), as well as tracks that info's *age*. Lastly, it implements logic for determining how often the shard\nshould be polled for new info, based on the shard's activity level.\n\n### Shard Watcher\n\nThe shard watcher is responsible for watching for new shards being added to the system, as well as live shards being\nremoved from it, and notifying the shard publisher accordingly. A default implementation (`LocalShardWatcher`) is\nprovided with the framework, which attempts to track all running instances of `redis-server` on the local machine;\nhowever, this is meant for demonstration purposes only, and is not designed for production code.\n\n\u003e **The system is designed for you to plug in your own shard watcher that implements your application-specific logic.**\n\n### Poller\n\nThe poller uses gevent-based concurrency to periodically poll all live shards for up-to-date info. The polling interval\nis determined independently for each shard, based on the logic implemented in the `RedisShard` class.\n\n### Servicer\n\nProvides the API to be exposed by an appropriate server for querying the system.\n\nCurrently the servicer interface is written for usage with RPC modules such as\n[xmlrpclib](https://docs.python.org/2/library/xmlrpclib.html) in mind, and this is what's used in the included example\nserver/client. However, writing an adapter wrapper to support a different kind of server interface (e.g.: gRPC, HTTP\nREST) should be a relatively straightforward task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fredis_info_provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredislabs%2Fredis_info_provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fredis_info_provider/lists"}