{"id":23060104,"url":"https://github.com/rodrigosetti/yconf","last_synced_at":"2026-05-02T19:33:45.602Z","repository":{"id":142542516,"uuid":"110188793","full_name":"rodrigosetti/yconf","owner":"rodrigosetti","description":"Yahoo Configuration Service (configuration as a service)","archived":false,"fork":false,"pushed_at":"2017-11-10T01:52:11.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T07:15:13.858Z","etag":null,"topics":["configuration","configuration-management","haskell","http","http-server","json","json-api"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodrigosetti.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":"2017-11-10T01:50:16.000Z","updated_at":"2020-01-20T03:06:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2b92756-2c9d-4d54-b3a5-6e7f406eaff1","html_url":"https://github.com/rodrigosetti/yconf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rodrigosetti/yconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigosetti%2Fyconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigosetti%2Fyconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigosetti%2Fyconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigosetti%2Fyconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigosetti","download_url":"https://codeload.github.com/rodrigosetti/yconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigosetti%2Fyconf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"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":["configuration","configuration-management","haskell","http","http-server","json","json-api"],"created_at":"2024-12-16T03:11:27.268Z","updated_at":"2026-05-02T19:33:45.583Z","avatar_url":"https://github.com/rodrigosetti.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YConf\n\nThe Yahoo! Configuration System.\n\n## What is it?\n\nYConf is a configuration server. It contains a collection of configuration\nfiles (JSON or YAML) that specify multi-dimensional configuration data (like\nYCB, but with some minor design differences), and respond to contextual queries\nfrom clients in either a RESTful JSON HTTP frontend or a [message\npack](http://msgpack.org) RPC frontend (or both simultaneously).\n\n## Features\n\n * Specify configuration data in JSON or YAML (format is almost like YCB).\n * File-system back-end: yconf loads configuration from files.\n * HTTP back-end: yconf loads configuration from http endpoints.\n * Live reload: the server automatically reloads if configuration back-end\n   changes.\n * HTTP JSON frontend (supports jsonp)\n * [Message pack](http://msgpack.org) RPC over TCP frontend.\n\n## Usage example\n\n### Command line options\n\n```console\n Usage: yconf [-p|--path PATH] [-u|--url URL] [--http [BIND:]PORT]\n              [--rpc [BIND:]PORT]\n\n Available options:\n   -h,--help                Show this help text\n   --yconf-config PATH      Optional configuration file for yconf (alternative to\n                            command line)\n   -p,--path PATH           location of configuration files\n   -u,--url URL             URL of configuration master\n   --http [BIND:]PORT       bind host and port to start the HTTP server\n   --rpc [BIND:]PORT        bind host and port to start the TCP message pack RPC\n                            server\n   -l,--log-output PATH     file to write log (default to stderr)\n   --log-level [Trace|Debug|Info|Warn|Error|Fatal]\n                            log level (default: Info)\n```\n\nMultiple front-ends can be used (at least one should be defined by `--http`\nand/or `--rpc`), but only one back-end must be used (`--path` or `--url`),\nbecause there must be only one source of truth for configuration data.\n\nIf using the `--yconf-config` option, one can specify a file to read the\nconfigurations. It's an alternative to the command line interface. It must be a\nYAML file defining the configurations, example:\n\n```yaml\npath        : examples/1\nhttp        : 127.0.0.1:4080\nmsgpack-rpc : 3000\nlog-output  : /var/log/yconf.log\nlog-level   : Debug\n```\n\nHere's another example using HTTP back-end, just the HTTP front-end (any host,\n4080 port), and using defaults for the rest:\n\n```yaml\nurl              : \"http://localhost:8080/MANIFEST\"\nhttp             : 4080\n```\n\nIf using the HTTP back-end (with `--url`), then this URL should return a JSON or\nYAML data defining the \"configuration manifest\", which is simply a YAML\ncontent defining three things (see [examples](examples)):\n\n * The configuration hash - this is used to keep track whether or not Yconf\n   should update the configuration tree.\n * The dimensions URL (relative or absolute).\n * A list of rules URLs (relative or absolute).\n\nExample:\n\n```yaml\nhash: f84adeee0cbf2a267e00df741d7d3c66\ndimensions: /dimensions.yml\nrules:\n    - /config1.yml\n    - /config2.json\n```\n\nWhenever the hash changes, the configuration system is reloaded (yconf checks\nevery 10 seconds).\n\n### Example (HTTP JSON)\n\n```console\n$ yconf --path examples/1/ --http 4080\n```\n\nHere `path` specifies where are the configuration files (see\n[examples](examples) folder); and `listen` specify the TCP port serve.\nOptionally, one could specify `hostname:port` ( _e.g._ `127.0.0.1:4080` to\naccept only local connections) to bind to a specific host.\n\nThen, one can access contextual configuration, like:\n\n```HTTP\nGET /?runtime=client\u0026device=iphone\u0026environment=development HTTP/1.1\n```\n\n```json\n{\n    \"status\": 200,\n    \"result\": {\n        \"location_backend\": {\n            \"hostname\": \"mock.geo.data-example.com\",\n            \"path\": \"/data/fetch\"\n        },\n        \"features\": {\n            \"use_library_x\": false,\n            \"library_z_version\": 9,\n            \"use_library_y\": false\n        }\n    }\n}\n```\n\nYou can get a specify sub-configuration by encoding the keys in the path:\n\n```http\nGET /features?runtime=client\u0026device=iphone\u0026environment=development HTTP/1.1\n```\n\n```json\n{\n    \"status\": 200,\n    \"result\": {\n        \"use_library_x\": false,\n        \"library_z_version\": 9,\n        \"use_library_y\": false\n    }\n}\n```\n\nOr even:\n\n```http\nGET /features/library_z_version?runtime=client\u0026device=iphone\u0026environment=development HTTP/1.1\n```\n\n```json\n{\n    \"status\": 200,\n    \"result\": 9\n}\n```\n\n## Implementation\n\nYConf uses a blazing fast new algorithm for contextual projection. It\npre-process the configuration and the dimension combinations into an internal\ntree. That gives linear performance guarantees:\n\n * Memory usage is **linear** to the size of the configuration.\n * Runtime (time to lookup a configuration) is **linear** to the number of\n   configuration rules that matches the context query.\n\n### Comparison to YCB\n\nYconf is 100% compatible to [YCB](https://github.com/yahoo/ycb-java), but it\nalso adds the following benefits:\n\n * Platform agnostic - integration is with Yconf is through JSON over HTTP or\n   message-pack over TCP.\n * Decoupling - That means two things: ability to change configuration without\n   redeployments, and, ability to use the same configuration base for different\n   applications (possibly distinct platforms).\n * Support more types (all JSON types), instead of only \"map\" and \"string\".\n\nPlease note that Yconf don't have integrated cache (yet).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigosetti%2Fyconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigosetti%2Fyconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigosetti%2Fyconf/lists"}