{"id":13565332,"url":"https://github.com/eventuate-examples/eventuate-examples-java-customers-and-orders","last_synced_at":"2025-04-03T22:31:10.668Z","repository":{"id":42188252,"uuid":"61841214","full_name":"eventuate-examples/eventuate-examples-java-customers-and-orders","owner":"eventuate-examples","description":"Java version of the Customers and Orders event sourcing example from my presentations","archived":false,"fork":false,"pushed_at":"2024-09-23T04:59:19.000Z","size":416,"stargazers_count":392,"open_issues_count":18,"forks_count":204,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-11-04T18:46:43.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/eventuate-examples.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}},"created_at":"2016-06-23T22:35:10.000Z","updated_at":"2024-10-21T22:58:53.000Z","dependencies_parsed_at":"2024-01-14T04:07:23.202Z","dependency_job_id":null,"html_url":"https://github.com/eventuate-examples/eventuate-examples-java-customers-and-orders","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/eventuate-examples%2Feventuate-examples-java-customers-and-orders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventuate-examples%2Feventuate-examples-java-customers-and-orders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventuate-examples%2Feventuate-examples-java-customers-and-orders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventuate-examples%2Feventuate-examples-java-customers-and-orders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eventuate-examples","download_url":"https://codeload.github.com/eventuate-examples/eventuate-examples-java-customers-and-orders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247090047,"owners_count":20881910,"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-08-01T13:01:44.798Z","updated_at":"2025-04-03T22:31:05.647Z","avatar_url":"https://github.com/eventuate-examples.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"This is the Java version of the customers and orders example that I've used in numerous presentations\non developing microservices with event sourcing and CQRS.\nThe code is built using the Eventuate platform.\nIt illustrates how to implement an eventually consistent credit limit check using event sourcing.\nFor more information, see this [presentation from Gluecon 2016](http://www.slideshare.net/chris.e.richardson/a-pattern-language-for-microservices-gluecon-2016/24)\n\n# About Eventuate\u0026trade;\n\n![](http://eventuate.io/i/logo.gif)\n\nThe application is built using [Eventuate](http://eventuate.io/), which is an application platform for writing transactional microservices.\nIt provides a simple yet powerful event-driven programming model that is based on event sourcing and Command Query Responsibility Segregation (CQRS).\nEventuate solves the distributed data management problems inherent in a microservice architecture.\nIt consists of a scalable, distributed event store and client libraries for various languages and frameworks including Java, Scala, and the Spring framework.\n\n# Building and running the application.\n\nThis is a Java 8, Gradle project. However, you do not need to install Gradle since it will be downloaded automatically. You just need to have Java 8 installed.\n\n\n## Building and running using Eventuate Local\n\nFirst, build the application:\n\n```\n./gradlew assemble\n```\n\nNext, you can launch the application using [Docker Compose](https://docs.docker.com/compose/)\n\nNote:\n\nIf the containers aren't accessible via `localhost` - e.g. you are using Docker Toolbox, you will have to use `${DOCKER_HOST_IP}` instead of localhost.\nSee this http://eventuate.io/docs/usingdocker.html[guide to setting `DOCKER_HOST_IP`] for more information.\n\n```\n./gradlew \u003cdatabase-mode\u003eComposeBuild\n./gradlew \u003cdatabase-mode\u003eComposeUp\n```\n\nWhere `database-mode` is one of:\n\n* `mysqlbinlog` - use MySQL with Binlog-based event publishing\n* `postgreswal` - use Postgres with Postgres WAL-based event publishing\n* `postgrespolling` - use Postgres with generic JDBC polling-based event publishing\n\nFinally, you can use the Swagger UI provided by the services to create customers and orders, and view the order history:\n\n* `http://localhost:8081/swagger-ui.html` - Create a customer\n* `http://localhost:8083/swagger-ui.html` - Create an order\n* `http://localhost:8082/swagger-ui.html` - View the customer and the order\n\n(Hint: best to open these URLs in separate tabs)\n\nThe script `./show-urls.sh` will display the URLs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventuate-examples%2Feventuate-examples-java-customers-and-orders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feventuate-examples%2Feventuate-examples-java-customers-and-orders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventuate-examples%2Feventuate-examples-java-customers-and-orders/lists"}