SlideShare una empresa de Scribd logo
1 de 58
Descargar para leer sin conexión
© Copyright 2018 Pivotal Software, Inc. All rights Reserved.
Abhinav Rau
Senior Platform Architect
arau@pivotal.io
@abhinavrau
https://github.com/abhinavrau/scdf-demo
Spring Cloud Data Flow Overview
Sadly, we add Complexity to
what’s complicated
Lack of Cohesion
Hard to Deploy
Excessive Configuration
What Complexity?
Avoid Tight Coupling
What Complexity?
Continuous Delivery with
Zero Downtime
Avoid Tight Coupling
What Complexity?
Scaling
Avoid Tight Coupling
Continuous Delivery with
Zero Downtime
What Complexity?
Test Surface Area
What Complexity?
(Loosely)
Story based on True Events..
??
Let’s Dive In…
Test Surface Area
• Unit Tests: 60+ Pre-built and Unit Tested Sources, Sinks and
Processors
• Integration Tests: Applications have a defined input/output
• Component Tests: Application is the Component boundary
• Contract Tests: External services are clearly visible and defined
• End to End Tests: This is where testing is needed.
Integration
Problem
Spring Integration
Spring Cloud Stream
Spring Boot
Spring Boot Data Pipeline
Microservice Data Pipeline
Microservice Data Pipeline
Function Data Pipeline
Spring Cloud Data Flow
Spring Cloud Data Flow
Spring Cloud Data Flow
Tools to create complex topologies
for streaming and batch
data pipelines
Spring Cloud Data Flow
Spring Cloud Stream
Spring Cloud Task
framework for building highly
scalable event-driven
microservices connected with
shared messaging systems
Spring Cloud Stream
Spring Cloud Stream
Rabbit MQ Apache Kafka Google PubSub
Amazon Kinesis Azure Event Hubs Solace
Pluggable Binder
Implementations
Spring Cloud Stream
Pluggable Binder
Implementations
Imperative + Functional
Programming Model
public class TransferServiceImpl implements TransferService {
public TransferServiceImpl(AccountRepository ar) {
this.accountRepository = ar;
}
Spring Cloud Stream
@EnableBinding(Processor.class)
public class Application {
@StreamListener("foo")
@SendTo("bar")
public String replaceStringMsgHandler(String payload) {
return StringUtils.replace(payload, "foo", "bar");
}
}
B
I
N
D
I
N
G
E
V
E
N
T
S
foo
channel
B
I
N
D
I
N
G
channel
bar
C
O
N
S
U
M
E
R
S
Message Channel Abstraction
Programming Model
Spring Cloud Stream
@EnableBinding(Processor.class)
public class Application {
@StreamListener("foo")
@SendTo("bar")
public Flux<Average> sensorAverage(Flux<Sensor> data) {
return . .;
}
}
E
V
E
N
T
S
B
I
N
D
I
N
G
foo
channel
bar
B
I
N
D
I
N
G
channel
C
O
N
S
U
M
E
R
S
Native Reactor Flux’s
Programming Model
Spring Cloud Stream
Programming Model
@EnableBinding(Processor.class)
public class Application {
@StreamListener("foo")
@SendTo("bar")
public KStream<Object, Foo> handler(KStream<Object,
Event> input){
return . .;
}
}
Native Kafka Streams
E
V
E
N
T
S
B
I
N
D
I
N
G
foo
channel
bar
B
I
N
D
I
N
G channel
C
O
N
S
U
M
E
R
S
Spring Cloud Stream
Programming Model
@EnableBinding(Processor.class)
public class Application {
@Bean
public Function<String, String> toUpperCase() {
return s -> s.toUpperCase();
}
}
E
V
E
N
T
S
B
I
N
D
I
N
G
foo
channel
bar
B
I
N
D
I
N
G channel
C
O
N
S
U
M
E
R
S
Plain Old Java Functions
Spring Cloud Stream
Pluggable Binder
Implementations
Stream
Partitions
Consumer
Groups
Message
Headers
Testing
Framework
Content-type
Negotiation
Imperative + Functional
Programming Model
public class TransferServiceImpl implements TransferService {
public TransferServiceImpl(AccountRepository ar) {
this.accountRepository = ar;
}
Spring Cloud Data Flow
Spring Cloud Stream
Spring Cloud Task
Spring Cloud Task
makes it easy to
orchestrate short-lived
microservices.
@EnableTask
public class TimestampTask {
@Bean
public TimestampTask timeStampTask() {
return new TimestampTask();
}
public static class TimestampTask implements CommandLineRunner {
@Override
public void run(String... strings) throws Exception {
DateFormat dateFormat = . .
logger.info(dateFormat.format(new Date()));
}
}
}
Database
R
E
P
O
S
I
T
O
R
Y
An arbitrary business-logic as short-lived Application
@EnableTask
Spring Cloud Task
@EnableTask
@EnableBatchProcessing
public class BatchJobApplication {
@Bean
public Step extractStep() { // extract business logic }
@Bean
public Step transformStep() { // transformation logic }
@Bean
public Step loadStep() { // persistence logic }
@Bean
public Job etlJob() {
return this.jobBuilderFactory.get("etlJob")
.start(extractStep())
.next(transformStep())
.next(loadStep())
.build();
}
}
Database
R
E
P
O
S
I
T
O
R
Y
Spring Batch Job as short-lived Application
Spring Cloud Task
Spring Cloud Task
Lifecycle Management Transactions
Bookkeeping for Restarts/Replay Historical Representation
Remote
Partitions
Spring Cloud Data Flow
Spring Cloud Stream
Spring Cloud Task
Spring Cloud Stream
Spring Cloud Task
Dem
o
Spring Cloud Stream -> Task
SFTP Source TaskLauncher ETL Job/Task
Database
Orchestrated by Spring Cloud Data Flow
SFTP Server
poll for
new files
publish each file launch task for each file
persist
parsed data
Spring Cloud Task -> Stream
SFTP Source TaskLauncher Batch Job/Task
Database
SFTP Server
poll for
new files
publish each file launch task for each file
persist
parsed data
:task-eventsTaskLauncher
Spring Cloud Data Flow
Integration Problems
Event Streaming
Orchestrating Short Lived Tasks
References
• Software developers are now more valuable to companies than money - CNBC
• Testing Strategies in a Microservice Architecture by Martin Fowler and Toby
Clemson
• Presentation Patterns by Neal Ford, Matthew McCullough, and Nate Schutta 
• Don't Walk Away from Complexity, Run • Venkat Subramaniam
• Distributed Sagas: A Protocol for Coordinating Microservices - Caitie McCaffrey
• Dave Syer, Pivotal—Choosing Software Abstractions, SpringOne Platform
2018
References (con’t)
• Code for Demos: https://github.com/abhinavrau/scdf-demo
• Spring Cloud Data Flow Microsite Reference Doc
• Spring Cloud Stream Samples | Gitter | StackOverflow
• Spring Cloud Task Samples | Gitter | StackOverflow
• Spring Cloud Skipper Samples | Gitter | StackOverflow
Transforming How The World Builds Software
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Camunda BPM 7.2: Performance and Scalability (English)
Camunda BPM 7.2: Performance and Scalability (English)Camunda BPM 7.2: Performance and Scalability (English)
Camunda BPM 7.2: Performance and Scalability (English)
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Spring Cloud Function: Where We Were, Where We Are, and Where We’re Going
Spring Cloud Function: Where We Were, Where We Are, and Where We’re GoingSpring Cloud Function: Where We Were, Where We Are, and Where We’re Going
Spring Cloud Function: Where We Were, Where We Are, and Where We’re Going
 
Microsoft power platform
Microsoft power platformMicrosoft power platform
Microsoft power platform
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
 
Modern Java web applications with Spring Boot and Thymeleaf
Modern Java web applications with Spring Boot and ThymeleafModern Java web applications with Spring Boot and Thymeleaf
Modern Java web applications with Spring Boot and Thymeleaf
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
 
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 

Similar a Spring Cloud Data Flow Overview

Similar a Spring Cloud Data Flow Overview (20)

Cloud Native Serverless Java — Orkhan Gasimov
Cloud Native Serverless Java — Orkhan GasimovCloud Native Serverless Java — Orkhan Gasimov
Cloud Native Serverless Java — Orkhan Gasimov
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
Spring boot
Spring bootSpring boot
Spring boot
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
Clean Architecture @ Taxibeat
Clean Architecture @ TaxibeatClean Architecture @ Taxibeat
Clean Architecture @ Taxibeat
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsug
 
Von neumann workers
Von neumann workersVon neumann workers
Von neumann workers
 
Serverless Spring by Stephane Maldini
Serverless Spring by Stephane MaldiniServerless Spring by Stephane Maldini
Serverless Spring by Stephane Maldini
 
Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018
 
Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
Spinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache KafkaSpinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache Kafka
 
Google cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache FlinkGoogle cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache Flink
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and Friends
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
 
Data Microservices In The Cloud + 日本語コメント
Data Microservices In The Cloud + 日本語コメントData Microservices In The Cloud + 日本語コメント
Data Microservices In The Cloud + 日本語コメント
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 

Más de VMware Tanzu

Más de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Spring Cloud Data Flow Overview

  • 1. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Abhinav Rau Senior Platform Architect arau@pivotal.io @abhinavrau https://github.com/abhinavrau/scdf-demo Spring Cloud Data Flow Overview
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Sadly, we add Complexity to what’s complicated
  • 8. Lack of Cohesion Hard to Deploy Excessive Configuration
  • 11. Continuous Delivery with Zero Downtime Avoid Tight Coupling What Complexity?
  • 12. Scaling Avoid Tight Coupling Continuous Delivery with Zero Downtime What Complexity?
  • 13. Test Surface Area What Complexity?
  • 14.
  • 15.
  • 16. (Loosely) Story based on True Events..
  • 17.
  • 18.
  • 19. ??
  • 20.
  • 22. Test Surface Area • Unit Tests: 60+ Pre-built and Unit Tested Sources, Sinks and Processors • Integration Tests: Applications have a defined input/output • Component Tests: Application is the Component boundary • Contract Tests: External services are clearly visible and defined • End to End Tests: This is where testing is needed.
  • 27. Spring Boot Data Pipeline
  • 33. Spring Cloud Data Flow Tools to create complex topologies for streaming and batch data pipelines
  • 34. Spring Cloud Data Flow Spring Cloud Stream Spring Cloud Task
  • 35. framework for building highly scalable event-driven microservices connected with shared messaging systems Spring Cloud Stream
  • 36. Spring Cloud Stream Rabbit MQ Apache Kafka Google PubSub Amazon Kinesis Azure Event Hubs Solace Pluggable Binder Implementations
  • 37. Spring Cloud Stream Pluggable Binder Implementations Imperative + Functional Programming Model public class TransferServiceImpl implements TransferService { public TransferServiceImpl(AccountRepository ar) { this.accountRepository = ar; }
  • 38. Spring Cloud Stream @EnableBinding(Processor.class) public class Application { @StreamListener("foo") @SendTo("bar") public String replaceStringMsgHandler(String payload) { return StringUtils.replace(payload, "foo", "bar"); } } B I N D I N G E V E N T S foo channel B I N D I N G channel bar C O N S U M E R S Message Channel Abstraction Programming Model
  • 39. Spring Cloud Stream @EnableBinding(Processor.class) public class Application { @StreamListener("foo") @SendTo("bar") public Flux<Average> sensorAverage(Flux<Sensor> data) { return . .; } } E V E N T S B I N D I N G foo channel bar B I N D I N G channel C O N S U M E R S Native Reactor Flux’s Programming Model
  • 40. Spring Cloud Stream Programming Model @EnableBinding(Processor.class) public class Application { @StreamListener("foo") @SendTo("bar") public KStream<Object, Foo> handler(KStream<Object, Event> input){ return . .; } } Native Kafka Streams E V E N T S B I N D I N G foo channel bar B I N D I N G channel C O N S U M E R S
  • 41. Spring Cloud Stream Programming Model @EnableBinding(Processor.class) public class Application { @Bean public Function<String, String> toUpperCase() { return s -> s.toUpperCase(); } } E V E N T S B I N D I N G foo channel bar B I N D I N G channel C O N S U M E R S Plain Old Java Functions
  • 42. Spring Cloud Stream Pluggable Binder Implementations Stream Partitions Consumer Groups Message Headers Testing Framework Content-type Negotiation Imperative + Functional Programming Model public class TransferServiceImpl implements TransferService { public TransferServiceImpl(AccountRepository ar) { this.accountRepository = ar; }
  • 43. Spring Cloud Data Flow Spring Cloud Stream Spring Cloud Task
  • 44. Spring Cloud Task makes it easy to orchestrate short-lived microservices.
  • 45. @EnableTask public class TimestampTask { @Bean public TimestampTask timeStampTask() { return new TimestampTask(); } public static class TimestampTask implements CommandLineRunner { @Override public void run(String... strings) throws Exception { DateFormat dateFormat = . . logger.info(dateFormat.format(new Date())); } } } Database R E P O S I T O R Y An arbitrary business-logic as short-lived Application @EnableTask Spring Cloud Task
  • 46. @EnableTask @EnableBatchProcessing public class BatchJobApplication { @Bean public Step extractStep() { // extract business logic } @Bean public Step transformStep() { // transformation logic } @Bean public Step loadStep() { // persistence logic } @Bean public Job etlJob() { return this.jobBuilderFactory.get("etlJob") .start(extractStep()) .next(transformStep()) .next(loadStep()) .build(); } } Database R E P O S I T O R Y Spring Batch Job as short-lived Application Spring Cloud Task
  • 47. Spring Cloud Task Lifecycle Management Transactions Bookkeeping for Restarts/Replay Historical Representation Remote Partitions
  • 48. Spring Cloud Data Flow Spring Cloud Stream Spring Cloud Task
  • 49. Spring Cloud Stream Spring Cloud Task Dem o
  • 50.
  • 51. Spring Cloud Stream -> Task SFTP Source TaskLauncher ETL Job/Task Database Orchestrated by Spring Cloud Data Flow SFTP Server poll for new files publish each file launch task for each file persist parsed data
  • 52. Spring Cloud Task -> Stream SFTP Source TaskLauncher Batch Job/Task Database SFTP Server poll for new files publish each file launch task for each file persist parsed data :task-eventsTaskLauncher
  • 53. Spring Cloud Data Flow Integration Problems Event Streaming Orchestrating Short Lived Tasks
  • 54.
  • 55.
  • 56. References • Software developers are now more valuable to companies than money - CNBC • Testing Strategies in a Microservice Architecture by Martin Fowler and Toby Clemson • Presentation Patterns by Neal Ford, Matthew McCullough, and Nate Schutta  • Don't Walk Away from Complexity, Run • Venkat Subramaniam • Distributed Sagas: A Protocol for Coordinating Microservices - Caitie McCaffrey • Dave Syer, Pivotal—Choosing Software Abstractions, SpringOne Platform 2018
  • 57. References (con’t) • Code for Demos: https://github.com/abhinavrau/scdf-demo • Spring Cloud Data Flow Microsite Reference Doc • Spring Cloud Stream Samples | Gitter | StackOverflow • Spring Cloud Task Samples | Gitter | StackOverflow • Spring Cloud Skipper Samples | Gitter | StackOverflow
  • 58. Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.