{"id":21846650,"url":"https://github.com/piran-framework/geev","last_synced_at":"2025-04-14T13:23:11.944Z","repository":{"id":57717749,"uuid":"125629333","full_name":"piran-framework/geev","owner":"piran-framework","description":"Very simple and lightweight Role-Based Node Discovery Library","archived":false,"fork":false,"pushed_at":"2023-07-16T17:41:48.000Z","size":63,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:38:47.647Z","etag":null,"topics":["discovery","discovery-networks","pure-java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piran-framework.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":"2018-03-17T12:58:23.000Z","updated_at":"2019-09-21T17:10:15.000Z","dependencies_parsed_at":"2022-09-10T21:02:16.009Z","dependency_job_id":null,"html_url":"https://github.com/piran-framework/geev","commit_stats":null,"previous_names":["behsa-oss/geev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piran-framework%2Fgeev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piran-framework%2Fgeev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piran-framework%2Fgeev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piran-framework%2Fgeev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piran-framework","download_url":"https://codeload.github.com/piran-framework/geev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886834,"owners_count":21177754,"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":["discovery","discovery-networks","pure-java"],"created_at":"2024-11-27T23:14:50.681Z","updated_at":"2025-04-14T13:23:11.922Z","avatar_url":"https://github.com/piran-framework.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geev\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.piran-framework/geev/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.piran-framework/geev)\n[![Travis IC](https://travis-ci.org/piran-framework/geev.svg?branch=master)](https://travis-ci.org/piran-framework/geev)\n[![codecov](https://codecov.io/gh/piran-framework/geev/branch/master/graph/badge.svg)](https://codecov.io/gh/piran-framework/geev)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f436671f55984fb79910aeff17a571d6)](https://www.codacy.com/app/esahekmat/geev?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=piran-framework/geev\u0026amp;utm_campaign=Badge_Grade)\n[![Javadocs](http://javadoc.io/badge/com.piran-framework/geev.svg)](http://javadoc.io/doc/com.piran-framework/geev)\n\nGeev is an implementation of the Piran Role-Based Node Discovery (PIRAN/RBND) version 1 \nspecification. Geev is a simple library you can add to your application and use it to discover \nother nodes and their roles. To understand the protocol see [RBND-specification](RBND-Specification.md)\n\n## The Name\nGeev is a mythical hero of the Iranian historical and mythical epic book, Shahnaame. Who went abroad\nand searched several years to find Kay-khosrow the king of the Iran. He finally found the king and\nbrought him and his mother back to Iran.\n\n## Usage\nFirst add maven dependency like this:\n```\n\u003cdependency\u003e\n        \u003cgroupId\u003ecom.piran-framework\u003c/groupId\u003e\n        \u003cartifactId\u003egeev\u003c/artifactId\u003e\n        \u003cversion\u003e0.3-RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\nThen you can create a new geev object like this:\n```\nGeev geev = new Geev(new GeevConfig.Builder()\n            .onJoin((node) -\u003e /* do what you want when a new node found*/)\n            .onLeave((node) -\u003e /* also do what you want when a node left*/)\n            .setMySelf(new Node(\"YourNodeRole\",yourInetAddress,yourPort))\n            .build()\n```\nIt start a background thread to do discovery.\n\n## Spring-boot starter\nA Spring-boot-starter has been particularly designed for Geev which could be mounted on \nSpring-boot applications. By adding @EnableGeevContainer class-level annotation on the \nConfiguration class, Geev starts and scans all the beans with @GeevHook annotation. Note \nthat, if a class is marked with @GeevHook, that class would be qualified to be a Spring \ncomponent bean as well, so there would be no need to add @Component or @Service by doing so.\nEvery GeevHook class can contain methods annotated by @NodeJoined or @NodeLeft. These method \ninvoked when a new node joined or a existing node left.\nTo use geev starter add this dependency to your project:\n```\n\u003cdependency\u003e\n        \u003cgroupId\u003ecom.piran-framework\u003c/groupId\u003e\n        \u003cartifactId\u003egeev-spring-boot-starter\u003c/artifactId\u003e\n        \u003cversion\u003e0.3-RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n###Spring-Boot properties\nTo add geev-starter to a spring-boot application, add three properties besides spring-boot \nproperties:\ngeev.broadcast #to indicate use broadcast strategy. default true\ngeev.multicast-address #indicate the multicast address used in multicast strategy\ngeev.discovery-port  #which port geev use default 5172\ngeev.myself-role #role of the node\ngeev.myself-ip #ip of the node\ngeev.myself-port #port of the node\n\nThey are the same as GeevConfig fields.\n\n## Build\nYou need jdk \u003e= 1.8 and maven to build geev. simply use maven to build and install the artifact \ninto your local repository by the command:\n```\nmvn install\n```\nThen you can add geev into your project POM file like this:\n```\n\u003cdependency\u003e\n        \u003cgroupId\u003ecom.piran-framework\u003c/groupId\u003e\n        \u003cartifactId\u003egeev\u003c/artifactId\u003e\n        \u003cversion\u003e0.3-RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Contribution\nAny contributions are welcomed. Also if you find any problem using geev you can create issue in \ngithub issue tracker of the project. There is just one limitation for the contribution and it's \nrespect the code style located in code-style.xml\n\n## License\nCopyright (c) 2018 Isa Hekmatizadeh.\n\nGeev is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser \nGeneral Public License as published by the Free Software Foundation, either version 3 of the \nLicense, or (at your option) any later version.\n\nGeev is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the\nimplied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU Lesser General \nPublic License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiran-framework%2Fgeev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiran-framework%2Fgeev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiran-framework%2Fgeev/lists"}