{"id":15497387,"url":"https://github.com/heapwolf/vines","last_synced_at":"2025-06-16T04:33:24.907Z","repository":{"id":5089118,"uuid":"6251470","full_name":"heapwolf/vines","owner":"heapwolf","description":"[not actively maintained] Vines implements the gossip protocol as well as quorum-based voting machinery to facilitate cooperative decision making in distributed systems.","archived":false,"fork":false,"pushed_at":"2012-12-28T01:08:09.000Z","size":264,"stargazers_count":34,"open_issues_count":1,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-22T22:18:44.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"aestheticinteractive/Hover-UI-Kit","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heapwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-16T20:51:37.000Z","updated_at":"2021-06-14T03:44:52.000Z","dependencies_parsed_at":"2022-07-26T17:15:08.896Z","dependency_job_id":null,"html_url":"https://github.com/heapwolf/vines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fvines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fvines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fvines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fvines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heapwolf","download_url":"https://codeload.github.com/heapwolf/vines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331817,"owners_count":21413104,"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-10-02T08:33:19.121Z","updated_at":"2025-04-22T22:18:50.707Z","avatar_url":"https://github.com/heapwolf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Node Vines](https://raw.github.com/hij1nx/vines/master/node-vines.png)\n\n## Motivation\n\nDistributed software provides availability and fault-tolerance. To achieve this, a \ndistributed program has more than one discrete process that will run on any number of \ndevices or networks. If some of the processes in the program are partitioned or lost,\nthe program can continue to run. All of this happens behind the scenes and the user\nwill observe a single coherent program.\n\nEach process in a distributed program will likely produce data and or want to act \non behalf of the entire program. Each process needs to make informed decisions that \nare based on local data as well as data created by other processes in the program. \nIt's not always efficient or possible to have all the processes in a network \nsynchronize before a decision needs to be made.\n\n## Synopsis\nVines attempts to facilitate coordinated decision making through a combination of \n[eventual consistency][0] and [quorum-based consensus][1]. Vines may be useful for\napplications such as _monitoring_ and _automated provisioning_.\n\nVines aims to be a high level solution. It implements connection machinery. If you\nare looking for a simple streamable gossip implementation, consider [scuttlebutt][3].\n\n## Features\n\n - Quorum based consensus; a simple voting protocol that is partition tolerant.\n - Gossip based data replication; reduces network footprint in large networks.\n - Attempts automatic reconnect for peer processes before selecting a new random peer.\n\n## Examples\n\n### Data replication\n\nA computer at `192.168.0.2` can generate some information.\n\n```js\n  var vine = Vine()\n\n  vine\n    .listen(8000)\n    .gossip('foo', 'hello, world')\n```\n\nA computer at `192.168.0.3` can discover that information regardless of\nwhen then peers were connected or when the data was entered.\n\n```js\n  var vine = Vine()\n\n  vine\n    .listen(8000)\n    .join(8000, '192.168.0.2')\n    .on('gossip', 'foo', function(value) {\n      console.log(value);\n    })\n```\n\n### Concensus\n\nA computer at `192.168.0.2` can call an election and cast a vote.\n\n```js\n\n  var electionCriteria = {\n    topic: 'email',\n    expire: String(new Date(now.setMinutes(now.getMinutes() + 5))),\n    min: 2,\n    total: 2\n  }\n\n  var vine = Vine()\n\n  vine\n    .listen(8000)\n    .on('quorum', onQuorum)\n    .on('expire', onExpire)\n    .election(electionCriteria)\n    .vote('email', true)\n```\n\nA computer at `192.168.0.3` can also call an election however only one\nof the peers will be able to execute the callback for the `quorum` event.\n\n```js\n  var vine = Vine()\n\n  vine\n    .listen(8000)\n    .join(8000, '192.168.0.2')\n    .on('quorum', onQuorum)\n    .on('expire', onExpire)\n    .election(electionCriteria)\n    .vote('email', true)\n```\n\n[0]:http://www.oracle.com/technetwork/products/nosqldb/documentation/consistency-explained-1659908.pdf\n[1]:http://pbs.cs.berkeley.edu/pbs-vldb2012.pdf\n[2]:http://www.cs.utexas.edu/~lorenzo/papers/p14-alvisi.pdf\n[3]:https://github.com/dominictarr/scuttlebutt\n[4]:http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=5A7801DAF5FBEDD7D15599DEA8AA2677?doi=10.1.1.34.9524\u0026rep=rep1\u0026type=pdf\n[5]:http://net.pku.edu.cn/~course/cs501/2011/resource/2006-Book-distributed%20systems%20principles%20and%20paradigms%202nd%20edition.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapwolf%2Fvines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheapwolf%2Fvines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapwolf%2Fvines/lists"}