Giter VIP home page Giter VIP logo

benwilcock / spring-cloud-dataflow-demo Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 9.0 206 KB

Demonstration of streaming applications using Spring Cloud Data Flow with microservices written in Spring Cloud Stream.

License: GNU General Public License v3.0

Java 87.72% Shell 12.28%
spring-cloud-data-flow spring-cloud-stream spring-boot microservices streaming-data streaming-data-generator streaming-data-processing

spring-cloud-dataflow-demo's Introduction

Spring Cloud Data Flow Demo

Bank Loan Data Processing Stream

This demo code shows how to construct a streaming application in Spring Cloud Data Flow using Java applications written in Spring Cloud Stream.

The demo code in this repository models a simple Bank Loan processing stream whereby new loans are generated and then sorted into APPROVED and DECLINED states by a loan processor.

By default, the loan applications are confugured to expect RabbitMQ to provide the underlying messaging infrastucture (although this could be switched to Apache Kafka with very little effort).

Spring Cloud Data Flow is important because it takes care of installing, starting and stopping the applications at runtime, and provides the messaging backbone which the applications use to communicate.

Diagram of the Bank Loan Stream

How it works:

The loan-source and loan-processor applications are compiled, packaged, and containerized by the Spring Boot Maven plugin. Once built (with spring-boot:build-image) the containers are then pushed to Docker Hub where they are then publicly accessible. The log-sink application is provided by Spring Cloud Data Flow as one of it's ready to use components (although not installed by default).

Scripts in the scripts folder deploy the stream using the Spring Cloud Data Flow CLI. The register-apps.sh script registers the applications. The build-flow.sh script defines and deploys the loan processing stream to dataflow using the properties provided in a text file. The flow defined in the script echo's the diagram above. Note that each of the applications is registered using the app type and deployed by Data Flow in parrallel (||). This is because the loan-processor uses a single-input with multiple-outputs approach.

During the deployment of the stream, Spring Cloud Data Flow takes care of installing the applications onto the infrastructure (K8s, CloudFoundry, etc.). Spring Cloud Data Flow will set the various properties that allow the applications to adapt to the infrastructure provided at runtime (IP's, ports, etc.)

Once deployed, the logs emitted from the loan-source, loan-processor, and log-sink components can be examined for their output.

spring-cloud-dataflow-demo's People

Contributors

benwilcock avatar

Stargazers

 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.