Coder Social home page Coder Social logo

thecodemonkey / kafka-microservices Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 10.0 3.09 MB

A series of tiny examples around Kafka and event driven microservices using Spring Framework written in Kotlin & Java.

License: MIT License

Kotlin 81.59% Java 18.41%
event-driven-architecture kafka-streams event-driven event-driven-microservices stream-processing event-sourcing cqrs kafka microservices microservices-kafka

kafka-microservices's Introduction

Event Driven Microservices with Kafka

A series of tiny examples around Kafka and event driven microservices using Spring Framework written in Kotlin & Java.

kafka microservices



Why

The world of software development is currently experiencing a radical change. Technologies such as Docker, Kubernetes or Kafka, but also paradigms such as event driven microservices are being used more and more widely. Not least because companies like Google, Facebook, LinkedIn or Amazon have achieved a great competitive advantage in recent years.

The great advantage of these technologies and the new approaches lies in their scaling. This does not necessarily mean the runtime performance of an application, but rather the Scaling the business model. Above all, the scaling of the actual software development process. The point is that you no longer have to develop a platform with ONE LARGE TEAM. Instead, many smaller teams can work in parallel and without any major arrangements bring different parts of an application into production very quickly and effectively and operate them there.

Decentralization and loose coupling bring the advantage not only in the code or in the infrastructure operation, but above all in the organization.



One of the reasons why this project was started, because it is very difficult to find really simple Microservices + Kafka examples. Most of the code examples are very complex and try to explain the use of Kafka in depth. All the details are of course important to be able to master a subject well at the end of the day. However, this level of detail makes difficult to get started. This project does not claim to fully explain the world of Kafka in its epic depth of detail.

This project aims to be a smooth and easy entry into the wonderful world of "event driven microservices with Kafka". Namasté.🧘



The goal of this project

The goal of this project is to gain technical understanding in development of event driven microservices with Kafka.

these are the specific goals:

  1. Basic understanding of the Kafka system
  2. understanding of Stream processing.
  3. Understanding of the event driven microservice approach using Kafka.
  4. implementation of architectural patterns(CQRS, ES, SAGA...) made using kafka

The following implementation examples are built iteratively so that you can reach the big goal with small steps.



sample projects

This repo contains several projects.

setting up a local kafka playground. More about the Kafka ecosystem.



a simple publish/subscribe sample using Kafka + Spring



a simple Unit-Test using Kafka + Spring + JUnit5 + EmbeddedKafka/KafkaContainer



a simple Kafka data streaming example using Kafka + Spring

Kafka Streams Api is not an additional runtime component of the Kafka system itself, but rather a library + architectural pattern. There is a separate lib or several different implementations for each technology stack(Java, Node/TypeSCript, Python..)



a simple event driven microservices example using Kafka + Spring + H2

There are 2 essential points that make up event-driven microservices:

  1. Each service has its own database
  2. The services do not call each other via. REST or HTTP. Instead, they only communicate with each other via events.

This guarantees maximum decoupling. This decoupling/autonomy makes an event driven microservice to a more maintainable microservice. Kafka is ideally suited as an event bus to ensure communication between the microservices.



a minimal CQRS microservice implementation using Kafka + Spring + H2

The purpose of CQRS (Command-Query-Responsibility-Segregation) lies in the decoupling of read and write operations. The communication between the decoupled Command- and Query-Services takes place by means of events.



a minimal Event Sourcing implementation using Kafka + Spring

event sourcing makes microservices more scalable and more resilient. And all of that by design. Kafka can be used excellently as an event store.

another event sourcing example using Streams API. In this example, the state is not stored in a local DB, but in a Kafka State Store.



hello kafka saga

a minimal SAGA pattern implementation using Kafka + Spring

...coming soon



hello kafka connect

a minimal Kafka Connect implementation using Kafka + Spring

...coming soon



hello kafka ksqlDB

a minimal stream processing example using Kafka ksqlDB

...coming soon



hello kafka security

a minimal kafka security examples

...coming soon



contibution

You are invited to contribute to the project.



contact

write me on twitter.



license

i ❤️ MIT

kafka-microservices's People

Contributors

thecodemonkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.