Giter Club home page Giter Club logo

flink-clean-architecture-example's Introduction

Flink-clean-architecture-demo

Build Status

An example of clean architecture Flink and Spring Boot

Foreword (french)

Cet example propose un packaging d'un job flink selon le pattern d'architecture hexagonale (également appelé Clean Architecture). De ce fait, les principes SOLID sont utilisés dans le code, notamment le Dependency Inversion Principle (à ne pas confondre avec la classique injection de dépendances avec Spring par exemple).

Il est divisé en 3 modules gradle: application, core, job

  • application: l'application spring boot qui permet de piloter le job, ici depuis un endpoint web
  • core: le code métier indépendant utilisable par l'application ou le job
  • job: le(s) job(s) flink utilisant le code métier du core

chacun constitué de 3 packages: domain, usecase et infrastructure qui doivent respecter ces règles :

  • domain contient le métier et son intelligence et n'a aucune dépendance vers l'extérieur : ni vers des frameworks (Hibernate par exemple), ni vers les packages usecase et infrastructure.
  • usecase est un chef d'orchestre et va dépendre uniquement du domain pour répondre à des cas d'utilisation métier. usecase ne doit pas avoir de dépendances vers infrastructure.
  • infrastructure contient toute la technique, et ne doit pas contenir de métier. infrastructure a des dépendances vers domain, usecase et les frameworks.

Install

./gradlew assemble

Test

./gradlew check

Run with docker

cd docker-compose && docker-composer up

Trigger the wordcount job

With swagger job-controller or with curl: curl -X POST "http://localhost:8080/jobs/wordCount" -H "accept: */*"

flink-clean-architecture-example's People

Contributors

bmeriaux avatar

Stargazers

 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.