{"id":26294619,"url":"https://github.com/afiore/hatoy","last_synced_at":"2025-10-09T03:35:20.985Z","repository":{"id":137467332,"uuid":"279591359","full_name":"afiore/hatoy","owner":"afiore","description":"Hazelcast playground project","archived":false,"fork":false,"pushed_at":"2020-07-21T16:53:50.000Z","size":31,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T03:33:02.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afiore.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-14T13:22:42.000Z","updated_at":"2020-07-14T13:23:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"17f64ad8-d746-4fb1-8807-7d440b388647","html_url":"https://github.com/afiore/hatoy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/afiore/hatoy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiore%2Fhatoy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiore%2Fhatoy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiore%2Fhatoy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiore%2Fhatoy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afiore","download_url":"https://codeload.github.com/afiore/hatoy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiore%2Fhatoy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000715,"owners_count":26082911,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-03-15T03:31:12.856Z","updated_at":"2025-10-09T03:35:20.981Z","avatar_url":"https://github.com/afiore.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hazelcast playground project\n\nA playground project to experiment with various Hazelcast features.\n\n## Functionality used\n\n* CP-susbsystem's [fenced locks](https://docs.hazelcast.org/docs/latest-dev/manual/html-single/index.html#fencedlock): to implement singleton tasks.\n* [IMap](https://docs.hazelcast.org/docs/latest-dev/manual/html-single/index.html#map) with [entry listener](https://docs.hazelcast.org/docs/latest-dev/manual/html-single/index.html#map-listener): to observe specific state changes in the values of a distributed map.\n* [ITopic pub/sub](https://docs.hazelcast.org/docs/latest-dev/manual/html-single/index.html#listening-for-topic-messages) - To implement topics and expose them via an akka-http web-socket.\n\n## Running the example code\n\nForm a local cluster by running 2-3 instances of the app. You can specify a port by supplying it as\nan argument to the project `Main` class.\n\n```bash\nsbt run 9999\n//...\nsbt run 10000\n//...\nsbt run 10001\n```\nOnce the nodes are up, one and only one of them will be holding a lock and populate a distributed\nmap of current weather conditions (keyed by city). One can access to the current weather condition from any\nnode by hitting the following endpoint:\n\n```bash\n❯ curl localhost:9999/current-weather/athens\nCurrentWeather(athens,Sunny,083e3133-1525-43a3-a089-37fae3c4a18d,2020-07-14T14:16:04.025)% \n```\n\nAn `EntryUpdatedListener` has been configured to react to specific weather condition changes and\npublish a list of adverts on a distributed topic. One can subscribe to the ads topic by hitting a websocket from any node in the cluster:\n\n```bash\n[nix-shell:~/code/hatoy]$ websocat ws://localhost:10000/ads\nAdvert(new-york,Buy this umbrella!)\nAdvert(barcelona,Buy this umbrella!)\nAdvert(london,Buy this umbrella!)\nAdvert(bari,Buy this umbrella!)\nAdvert(paris,Buy this umbrella!)\nAdvert(chania,Buy this umbrella!)\nAdvert(new-york,Buy this umbrella!)\nAdvert(athens,Buy this umbrella!)\nAdvert(paris,Buy this umbrella!)\nAdvert(london,Buy a disposable BBQ!)\nAdvert(chania,Buy this umbrella!)\nAdvert(london,Buy this umbrella!)\nAdvert(bari,Buy this umbrella!)\nAdvert(london,Buy a disposable BBQ!)\nAdvert(london,Buy this umbrella!)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiore%2Fhatoy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafiore%2Fhatoy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiore%2Fhatoy/lists"}