GithubHelp home page GithubHelp logo

antoniosergiojr / cqrs_quarkus_eks_digital_innovation_one Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 275 KB

Criando um sistema de orçamento, utilizando CQRS, Quarkus, Kafka e deploy no EKS

Home Page: https://github.com/wesleyfuchter

Java 60.13% JavaScript 13.31% HTML 26.56%
java apache-kafka apache-zookeeper quarkus cqrs docker kubernates pods postgresql amazon-eks

cqrs_quarkus_eks_digital_innovation_one's Introduction

Sistema de Orçamento | Digital Innovation One

Implementation to CQRS architecture using Quarkus and Kafka.

About CQRS - Command Query Responsibility Segregation

According with Martin Folwer

At its heart is the notion that you can use a different model to update information than the model you use to read information. For some situations, this separation can be valuable, but beware that for most systems CQRS adds risky complexity.

The application

Simulates a bank account scenario where an end user adds a income or expense transaction, and it is processed in a ascyncronous event sourcing and CQRS architecture to recalculate the user's bank account balance. The user can also request the balance of it's account. Down here you can see the design:

Design

📌 Index


💻 Technologies

- Java
- Apache Kafka (distributed platform of messaging and streaming. Broker: instances of kafka)
- Apache ZooKeeper (manage all brokers in kafka)
- Quarkus (it offers small memory footprint and reduced boot time, indicated only in the scenario of microservices)
- CQRS architecture (CQRS is an architectural pattern that separates the models for reading and writing data)
- Docker (set of platform as a service products that use OS-level virtualization to deliver software in packages called containers)
- Kubernetes (K-ubernate-s = K8s is a open-source system for automating deployment, scaling, and management of containerized applications)
- Pods Kubernates (represents a single instance of a running process in your cluster)
- PostgreSQL
- Amazon EKS (Amazon Elastic Kubernetes Service gives you the flexibility to start, run, and scale Kubernetes applications in the AWS cloud or on-premises)

🚀 How to run

Cloning the repository

  # Cloning repository
  git clone https://github.com/antoniosergiojr/cqrs_quarkus_eks_digital_innovation_one.git

Deploying the external services

docker-compose up -d --build

It will deploy four docker containers on your environment with PostgreSQL (or MongoDB), Kafka and Zookepper (required by Kafka)

After deploying Kafka, you'll need to create the topic on the Kafka cluster.

Testing the application

Running a CURL request to create a income transaction

curl -X POST -H "Content-Type: application/json" -d @income-transaction.json http://localhost:8080/transactions

Running a CURL request to create a expense transaction

curl -X POST -H "Content-Type: application/json" -d @expense-transaction.json http://localhost:8080/transactions

Running CURL request to fetch the balance

curl http://localhost:8081/balance\?accountId\=wesley | json_pp

Running K6's simple performance test

k6 run --vus 10 --duration 60s performance-tests/income.js
k6 run --vus 10 --duration 60s performance-tests/expense.js

cqrs_quarkus_eks_digital_innovation_one's People

Contributors

antoniosergiojr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.