{"id":32181613,"url":"https://github.com/cipherself/gossip","last_synced_at":"2026-02-19T07:03:06.156Z","repository":{"id":62432842,"uuid":"46664025","full_name":"cipherself/gossip","owner":"cipherself","description":"gossip is a Clojure library to do gossip dissemination of messages in a decentralized manner over unreliable networks.","archived":false,"fork":false,"pushed_at":"2025-11-14T10:58:08.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T04:47:25.567Z","etag":null,"topics":["clojure","gossip","gossip-dissemination"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cipherself.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-22T14:28:07.000Z","updated_at":"2025-11-14T10:58:12.000Z","dependencies_parsed_at":"2022-11-01T21:15:32.775Z","dependency_job_id":null,"html_url":"https://github.com/cipherself/gossip","commit_stats":null,"previous_names":["skeuomorf/gossip","cipherself/gossip"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cipherself/gossip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cipherself%2Fgossip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cipherself%2Fgossip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cipherself%2Fgossip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cipherself%2Fgossip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cipherself","download_url":"https://codeload.github.com/cipherself/gossip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cipherself%2Fgossip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"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":["clojure","gossip","gossip-dissemination"],"created_at":"2025-10-21T22:48:57.154Z","updated_at":"2026-02-19T07:03:06.151Z","avatar_url":"https://github.com/cipherself.png","language":"Clojure","readme":"# gossip\n\n`gossip` is a Clojure library to do gossip dissemination\nof messages in a decentralized manner over unreliable networks.\n\nIt is based on the paper [Peer-to-Peer Membership Management\nfor Gossip-Based Protocols](https://web.archive.org/web/20240816035237/https://people.maths.bris.ac.uk/~maajg/ieeetocs03-scamp.pdf) \n\n[![Clojars Project](https://clojars.org/gossip/latest-version.svg)](https://clojars.org/gossip)\n\n[Latest codox API docs](https://cipherself.github.io/gossip/)\n\n**WARNING WARNING WARNING: The messages gossiped between nodes\nare not encrypted, they are sent as plaintext, use at your own\ndiscretion.**\n\n## Usage\n\n```clojure\n;;;; Note: To accurately witness the dissemination\n;;;; capabilities, there should be a non-trivial amount\n;;;; of nodes in the network. The following example\n;;;; sacrifices that for brevity's sake but you\n;;;; should be able to expand it on your own easily,\n;;;; the library is intended to be a low-level building\n;;;; block for customized abstractions after all.\n\n(require '[gossip.core :refer [create-node send-initial\n                               handle-message\n                               schedule-heartbeat-send\n                               schedule-heartbeat-dec\n                               get-id gossip]]\n         '[gossip.utils :refer [receive]]\n         '[udp-wrapper.core :refer [create-udp-server close-udp-server\n                                    empty-packet localhost]])\n\n;; Get this machine's ip address as a string.\n(def ip (.getHostAddress (localhost)))\n\n;; Create nodes with this machine's ip address and different port numbers.\n(def node1 (ref (create-node ip 6601)))\n(def node2 (ref (create-node ip 6602)))\n\n;; Create a socket for each node.\n(def socket1 (create-udp-server 6601))\n(def socket2 (create-udp-server 6602))\n\n;; Start a receiving loop for each node, handle-message\n;; does pattern matching on the received messages and\n;; dispatches accordingly.\n(def fut1 (receive socket1 (empty-packet 512) node1 handle-message))\n(def fut2 (receive socket2 (empty-packet 512) node2 handle-message))\n\n;; Send a heartbeat every 30 seconds to all nodes in\n;; each node's partial-view\n(schedule-heartbeat-send socket1 node1 (* 1000 60 5))\n(schedule-heartbeat-send socket2 node2 (* 1000 60 5))\n\n;; Decrease the heartbeat-counter of each node\n;; every 5 minutes.\n(schedule-heartbeat-dec socket1 node1 (* 1000 60 5))\n(schedule-heartbeat-dec socket2 node2 (* 1000 60 5))\n\n;; Send an InitialSubscription from node1 to node2.\n(send-initial socket1 node1 (get-id @node2))\n\n;; Gossip the message to all nodes in node1's partial-view.\n(gossip socket1 node1 \"No one shall expel us from the paradise that Cantor has created.\")\n\n;; Shutdown\n(future-cancel fut1)\n(future-cancel fut2)\n(close-udp-server socket1)\n(close-udp-server socket2)\n```\n\n## TODO\n\n* Survey the Clojure testing facilities and decide on one.\n* Seriously! MOAR TESTS!\n* Proper validation for IDs and messages.\n* DTLS.\n* Implement indirection.\n* Implement lease functionality.\n* Decouple the design parameter?\n\n## License\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcipherself%2Fgossip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcipherself%2Fgossip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcipherself%2Fgossip/lists"}