{"id":28749666,"url":"https://github.com/psigen/flexure","last_synced_at":"2025-06-16T20:44:06.562Z","repository":{"id":12900593,"uuid":"15577664","full_name":"psigen/flexure","owner":"psigen","description":"Flexure is a lightweight middleware mechanism for fast real-time communication.","archived":false,"fork":false,"pushed_at":"2014-09-03T21:25:09.000Z","size":300,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-15T11:29:57.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xunit/assert.xunit","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psigen.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}},"created_at":"2014-01-02T06:48:24.000Z","updated_at":"2021-05-17T07:43:57.000Z","dependencies_parsed_at":"2022-09-17T05:52:46.308Z","dependency_job_id":null,"html_url":"https://github.com/psigen/flexure","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/psigen/flexure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psigen%2Fflexure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psigen%2Fflexure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psigen%2Fflexure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psigen%2Fflexure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psigen","download_url":"https://codeload.github.com/psigen/flexure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psigen%2Fflexure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260236327,"owners_count":22979397,"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":"2025-06-16T20:44:05.190Z","updated_at":"2025-06-16T20:44:06.555Z","avatar_url":"https://github.com/psigen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flexure\n=======\n\nA prototype of a low-overhead middleware layer for fast configuration\nand IPC in real-time.\n\nThis is only a prototype.  Do not use this in production code.\n\nExamples\n--------\n\nDifferent ways of getting and setting values into ``/apple/orange``:\n```c++\nflex = new Flexure(\"/\");\n*flex[\"apple\"][\"orange\"] = 2.0;\n*flex[\"apple/orange\"] = 2.1;\n*flex[\"apple//orange\"] = 2.2;\n*flex[\"/apple/orange\"] = 2.3;\n*(new Flexure(\"/apple\"))[\"orange\"] = 2.4;\n*(new Flexure(\"apple\"))[\"orange\"] = 2.5;\n\nint orange = *flex[\"apple\"][\"orange\"];\nstd::cout \u003c\u003c \"Orange is '\"\n          \u003c\u003c orange \u003c\u003c \"'\" \u003c\u003c std::endl;\n// Prints \"Orange is '2.5'\"\n```\n\nRemapping namespaces at runtime:\n```c++\nflex = new Flexure(\"apple\");\nflex.remap(\"orange\", \"/pear\");\n*flex[\"orange\"] = 2.0; // Sets /pear = 2.0\n*flex[\"/orange\"] = 2.0; // Sets /orange = 2.0\n*flex[\"mango\"] = 2.0; // Sets apple/mango = 2.0\n```\n\nRegistering a callback when a node changes values:\n```c++\nvoid callback(Flexure f, value) {\n  std::cout \u003c\u003c \"Changed to '\" \n            \u003c\u003c new_val \u003c\u003c \"'\" \u003c\u003c std::endl;\n}\n\nflex = new Flexure(\"/\");\n*flex[\"apple\"][\"orange\"] = 1.0;\n\nflex[\"apple\"][\"orange\"].Observe(callback);\n*flex[\"apple\"][\"orange\"] = 2.0;\n// Prints \"Changed to '2.0'\"\n\nflex[\"apple\"][\"orange\"].Unobserve(callback);\n*flex[\"apple\"][\"orange\"] = 0.0;\n// No output\n```\n\nLocking a hierarchy for read persistence:\n```c++\nFlexure f = flex[\"apple\"];\nFlexure f2 = flex[\"apple\"];\n*f = 2.0;\n\nf.Lock();\n\nint apple = *f;\nstd::cout \u003c\u003c \"Apple is '\"\n          \u003c\u003c apple \u003c\u003c \"'\" \u003c\u003c std::endl;\n// Prints \"Apple is '2.0'\"\n\n*f = 2.5;\n*f2 = 3.0;\n\nint apple = *f;\nstd::cout \u003c\u003c \"Apple is '\"\n          \u003c\u003c apple \u003c\u003c \"'\" \u003c\u003c std::endl;\n// Prints \"Apple is '2.5'\"\n\nf.Unlock();\n\nint apple = *f;\nstd::cout \u003c\u003c \"Apple is '\"\n          \u003c\u003c apple \u003c\u003c \"'\" \u003c\u003c std::endl;\n// Prints \"Apple is '3.0'\" OR \"Apple is '2.5'\"\n```\n\nTransacting a hierarchy for atomic updates:\n```c++\nFlexure f = flex[\"apple\"];\nf.BeginTransaction();\n*f = 2.0;\n*f[\"apple\"] = false;\n*f[\"pear\"] = \"Pear\";\nf.EndTransaction();\n```\n\nPhilosophy\n----------\n  * IPC metadata will be read in YAML and sent in JSON to maximize compatibility.\n  * Customizable serialization/deserialization templates can be added.\n  * It should be possible to change transports completely without changing the backing store.\n  * It should be possible to change front-end APIs entirely without changing the backing store.\n  * Only one special value in the YAML schema: \u003cTYPE\u003e\n  * Use native data formats or interfaces in any native language implementation.\n  * Don't require Boost, but be compatible with Boost.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsigen%2Fflexure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsigen%2Fflexure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsigen%2Fflexure/lists"}