{"id":13806217,"url":"https://github.com/smoketurner/dropwizard-atomix","last_synced_at":"2025-05-13T21:32:32.315Z","repository":{"id":55990207,"uuid":"114549327","full_name":"smoketurner/dropwizard-atomix","owner":"smoketurner","description":"Dropwizard Atomix Bundle","archived":true,"fork":false,"pushed_at":"2020-12-02T15:53:49.000Z","size":862,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T22:31:31.471Z","etag":null,"topics":["atomix","distributed-systems","dropwizard","dropwizard-atomix","java","jvm","raft"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smoketurner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"jplock","patreon":"jplock","open_collective":null,"ko_fi":null,"tidelift":null,"custom":null}},"created_at":"2017-12-17T15:56:37.000Z","updated_at":"2023-01-28T11:38:54.000Z","dependencies_parsed_at":"2022-08-15T11:00:20.191Z","dependency_job_id":null,"html_url":"https://github.com/smoketurner/dropwizard-atomix","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoketurner%2Fdropwizard-atomix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoketurner%2Fdropwizard-atomix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoketurner%2Fdropwizard-atomix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoketurner%2Fdropwizard-atomix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smoketurner","download_url":"https://codeload.github.com/smoketurner/dropwizard-atomix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254031332,"owners_count":22002747,"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":["atomix","distributed-systems","dropwizard","dropwizard-atomix","java","jvm","raft"],"created_at":"2024-08-04T01:01:09.010Z","updated_at":"2025-05-13T21:32:31.697Z","avatar_url":"https://github.com/smoketurner.png","language":"Java","funding_links":["https://github.com/sponsors/jplock","https://patreon.com/jplock","https://www.patreon.com/bePatron?u=9567343"],"categories":["Open Source"],"sub_categories":["Data Stores"],"readme":"Dropwizard Atomix\n=================\n[![Build Status](https://travis-ci.org/smoketurner/dropwizard-atomix.svg?branch=master)](https://travis-ci.org/smoketurner/dropwizard-atomix)\n[![Maven Central](https://img.shields.io/maven-central/v/com.smoketurner.dropwizard/dropwizard-atomix.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.smoketurner.dropwizard/dropwizard-atomix/)\n[![GitHub license](https://img.shields.io/github/license/smoketurner/dropwizard-atomix.svg?style=flat-square)](https://github.com/smoketurner/dropwizard-atomix/tree/master)\n[![Become a Patron](https://img.shields.io/badge/Patron-Patreon-red.svg)](https://www.patreon.com/bePatron?u=9567343)\n\nA bundle for integrating [Atomix](http://atomix.io/atomix/) in Dropwizard applications.\n\nUsage\n-----\n\nWithin your `Configuration` class, add the following:\n\n```java\n@Valid\n@NotNull\nprivate final AtomixFactory atomix = new AtomixFactory();\n\n@JsonProperty\npublic AtomixFactory getAtomixFactory() {\n    return atomix;\n}\n```\n\nThen with your `Application` class, you can access an `Atomix` by doing the following:\n\n```java\n@Override\npublic void initialize(Bootstrap\u003cMyConfiguration\u003e bootstrap) {\n    bootstrap.addBundle(new AtomixBundle\u003cMyConfiguration\u003e() {\n        @Override\n        public AtomixFactory getAtomixFactory(MyConfiguration configuration) {\n            return configuration.getAtomixFactory();\n        }\n    });\n}\n\n@Override\npublic void run(MyConfiguration configuration, Environment environment) throws Exception {\n    Atomix atomix = configuration.getAtomixFactory().build();\n}\n```\n\nMaven Artifacts\n---------------\n\nThis project is available on Maven Central. To add it to your project simply add the following dependencies to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.smoketurner.dropwizard\u003c/groupId\u003e\n    \u003cartifactId\u003eatomix-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.3.7-1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nExample Application\n-------------------\n\nTo try the example application, checkout the code from Github then build the example hello world application.\n\n```\ngit clone https://github.com/smoketurner/dropwizard-atomix.git\ncd dropwizard-atomix\n./mvnw compile package\ncd atomix-example\n```\n\nYou then need to open 3 separate terminal windows to launch 3 instances of the application:\n\n```\njava -jar target/atomix-example-1.3.7-2-SNAPSHOT.jar server config1.yml\njava -jar target/atomix-example-1.3.7-2-SNAPSHOT.jar server config2.yml\njava -jar target/atomix-example-1.3.7-2-SNAPSHOT.jar server config3.yml\n```\n\nOnce a quorum has been reached, Jetty will start up as normal on a random port which you'll be able to see in the logs.\n\n```\nINFO  [2018-01-07 15:29:43,489] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2ad99cf3{/admin,null,AVAILABLE}\nINFO  [2018-01-07 15:29:43,494] org.eclipse.jetty.server.AbstractConnector: Started hello-world@554f0dfb{HTTP/1.1,[http/1.1]}{0.0.0.0:55419}\nINFO  [2018-01-07 15:29:43,494] org.eclipse.jetty.server.Server: Started @13775ms\n```\n\nYou can then visit `http://localhost:55419/hello-world` to see the Dropwizard [Getting Started](https://www.dropwizard.io/1.3.5/docs/getting-started.html) example, but using a distributed counter across the cluster.\n\nSupport\n-------\n\nPlease file bug reports and feature requests in [GitHub issues](https://github.com/smoketurner/dropwizard-atomix/issues).\n\n\nLicense\n-------\n\nCopyright (c) 2018 Smoke Turner, LLC\n\nThis library is licensed under the Apache License, Version 2.0.\n\nSee http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoketurner%2Fdropwizard-atomix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmoketurner%2Fdropwizard-atomix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoketurner%2Fdropwizard-atomix/lists"}