SlideShare a Scribd company logo
1 of 32
Download to read offline
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Building Agile and Resilient Schema
Transformations using Apache Kafka
and ESB's
Transformation-free Data Pipelines by combining the Power
of Apache Kafka and the Flexibility of the ESB's
Ricardo Ferreira
Principal Solutions Architect
Cloud Solution Architects Team (A-Team)
March 21, 2017
@jricardoferreir
Building Agile and Resilient Schema Transf. using Kafka and ESB's
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• Ricardo Ferreira
– Principal Solutions Architect, Oracle
Building Agile and Resilient Schema Transf. using Kafka and ESB's 4
• Freaking nerd, proud husband and father
• I have been writing code since 1997
• Currently working in the Oracle A-Team
• Author of couple Kafka-based projects:
 Service Bus Transport for Kafka
 Stream Explorer Adapter for Kafka
@jricardoferreir
Who am I ?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
API changes, Transformations and Decoupling
Hands-on Demonstration using the Oracle Cloud
Why Apache Kafka instead of other Options?
1
2
3
Building Agile and Resilient Schema Transf. using Kafka and ESB's 5
Agenda
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Wait… did you say ESB's? Aren't they evil?
• Modern Cloud-Native applications are built on top of design principles that
doesn't include ESB's. One of them is the Smart endpoints and Dumb Pipes
Building Agile and Resilient Schema Transf. using Kafka and ESB's 6
Service A
Service BusService B
Service C
Service D
Service E
Service F
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Wait… did you say ESB's? Aren't they evil?
• Modern Cloud-Native applications are built on top of design principles that
doesn't include ESB's. One of them is the Smart endpoints and Dumb Pipes
Building Agile and Resilient Schema Transf. using Kafka and ESB's 7
Service A
Service BusService B
Service C
Service D
Service E
Service F
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Smart Endpoints and Dump Pipes
• Let the endpoints handle the transformation logic required to expose
and/or invoke other endpoints. Pipes must only carry the messages in/out.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 8
Service A Service B
REST or Messaging
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 9
Wait… but what if
the API changes?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
We might have some options. And along with… trade-offs
Widely accepted solution among the
developer community, but it is not
bullet-proof and creates lots of code
and operational overhead. Jamie
Zawinski's used to say:
- "I'll use versioning. Now you have
2.1.0 problems."
Effective but relies on the assumption
that developers must coordinate to
handle the API changes. This might
work for certain cases, but is reactive
and creates organization overhead.
It creates a more complex architecture
upfront but handle changes almost on-
the-fly and allows services to react with
higher uptime while teams coordinate
to evolve their systems.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 10
Service Versioning Deployment Pipelines Design for Change Principle
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Design for Change Principle
• Whenever possible, exchange messages using messaging technologies. This
allows you to decouple the communication while providing a way to filter
and correct message schemas. Use REST for synchronous use cases only.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 11
Phase 1 :: Leveraging messaging in-between microservices
Service A Service B
Messaging using Topics
Benefits of this design:
 Messages will never be lost.
 Reliability while maintenance.
 Possibility of schema handling
 UI-ready using reactive coding
 Scalability using less hardware
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Design for Change Principle
• API providers hook up directly while API consumers hook up indirectly. By
using different message channels you can plugin schema transformations
on-the-fly. By default, just perform messages pass-through.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 12
Phase 2 :: Allow schema transformation by foreseen message channels
Service A Service B
Two topics per service
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Design for Change Principle
• When the time comes and your service API need to be changed, simply do
the change and allow a third-party service to handle the schema evolution.
This service responsibility is exclusively handle schemas. Ring any bells? 
Building Agile and Resilient Schema Transf. using Kafka and ESB's 13
Phase 3 :: Plugin schema transformation engines on-the-fly
Service A Service B
Two topics per service
Transformation Service
("A.K.A Service C")
This can be implemented in a variety
of ways but using ESB's seems to be a
natural fit. If this is a one time thing,
then maybe Serverless could work.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
API changes, Transformations and Decoupling
Hands-on Demonstration using the Oracle Cloud
Why Apache Kafka instead of other Options?
1
2
3
Building Agile and Resilient Schema Transf. using Kafka and ESB's 14
Agenda
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Understanding the "Use Case"
Building Agile and Resilient Schema Transf. using Kafka and ESB's 15
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
More specifically... this use case is about the Saviors/Negan
Building Agile and Resilient Schema Transf. using Kafka and ESB's 16
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Collecting Supplies from the Communities
Building Agile and Resilient Schema Transf. using Kafka and ESB's 17
Supplies
Collection
Scavenge
Lesson
Teaching
• Is it time to collect?
• What do we need?
• Half of their assets?
• Check Inventory
• Check their Demands
• Do scavenging…
• Is 50% of their assets?
• There was disrespect?
• Is Lucille angry?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Services Design :: First Iteration
Building Agile and Resilient Schema Transf. using Kafka and ESB's 18
Supplies
Collection
Service
Scavenge
Service
Lesson
Teaching
Service
Initiator
Service
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Services Design :: Second Iteration
Building Agile and Resilient Schema Transf. using Kafka and ESB's 19
Supplies
Collection
Service
Scavenge
Service
Lesson
Teaching
Service
Initiator
Service
Topic Topic
Topic
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Services Design :: Third Iteration
Building Agile and Resilient Schema Transf. using Kafka and ESB's 20
Supplies
Collection
Service
Scavenge
Service
Lesson
Teaching
Service
Initiator
Service
Topic
Service Bus
Topic Topic
Service Bus
TopicTopic
Service Bus
Topic Topic
Service Bus
Topic
Design for Change Principle
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Services Design :: Fourth Iteration
Building Agile and Resilient Schema Transf. using Kafka and ESB's 21
Supplies
Collection
Service
Scavenge
Service
Lesson
Teaching
Service
Initiator
Service
Topic
Service Bus
Oracle Java Cloud Service Oracle SOA Cloud Service
Topic
Oracle IaaS Cloud Service
Kafka Transport
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 22
Enough slides,
show me code
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Do you want to win a Negan Souvenir?
http://141.144.29.149:8080/oracle-code-2017/collectSupplies?name=XYZ
Building Agile and Resilient Schema Transf. using Kafka and ESB's 23
{
"timestamp" : "MM/dd/yyyy hh:mm:ss",
"requestorName" : "XYZ",
"outcome" : true
}
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
API changes, Transformations and Decoupling
Hands-on Demonstration using the Oracle Cloud
Why Apache Kafka instead of other Options?
1
2
3
Building Agile and Resilient Schema Transf. using Kafka and ESB's 24
Agenda
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
What is Apache Kafka?
• Simply Put, Kafka is a Distributed Streaming Platform
– Allows ingestion and consumption of streams of records
– Allows streams of records to be persisted with fault tolerance
– Allows streams of records to be processed as they happen
• It is Comprised of Six Main Modules:
– Kafka Cluster
– Producer API
Building Agile and Resilient Schema Transf. using Kafka and ESB's 25
– Consumer API
– Connector API
– Streams API
– REST Proxy *
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Kafka Design "Crash Course"
• For implementation simplicity; Kafka does not support the concept of many
destinations, topics are the only abstraction. However, both Queuing and
Pub/Sub scenarios are supported.
• In Kafka, Queuing is just a matter of how consumers are grouped together.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 26
• Each consumer has a property called group
id. When two (or more) consumers has the
same group id value, that means that they
belong to the same group.
• Consumers belonging to the same
group will load balance themselves
to fetch records from the partition.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Kafka Design "Crash Course"
• The basic abstraction in Kafka is called topics.
• Queue and Pub/Sub scenarios are supported.
• Topics are broken down in multiple partitions.
• Partitions are spread over the Kafka cluster.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 27
• Each partition is an ordered, immutable
sequence of records that is continuously
appended to a structured commit log.
• Committed records has an offset that
uniquely identifies it within the partition.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Kafka Design "Crash Course"
• Each partition has an ever-growing commit log.
• A log can be simply view as a list of linked files.
• Partition logs always carries the topic name and
the identifier of the partition (i.e.: "topic-0")
Building Agile and Resilient Schema Transf. using Kafka and ESB's 28
• Kafka's commit log has been designed for
maximum efficiency, therefore:
File journaling (O1 structures) may be faster than RAM
There is no JVM caching. Page Caching is used instead
Zero-copy transfer: CPU offloading using sendfile()
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Kafka Design "Crash Course"
• As mentioned before, Kafka supports fault tolerance. That is achieved with
the concept of replication. Replication happens in a per partition basis.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 29
• Partition backups are spread over
the cluster based on the number
defined in the replication factor.
• When replication is in place, one
broker is elected to be the leader
of a given partition. Only leaders
can read/write records. The rest
of the brokers (hosting replicas)
are called followers or ISR's.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• Any Kafka deployment must include a Zookeeper setup. That is mandatory.
Therefore, it is important to understand what role Zookeeper plays in Kafka.
Building Agile and Resilient Schema Transf. using Kafka and ESB's 30
• Zookeeper is used to store lots of metadata:
Controllers election. Keeps track of leaders and followers.
Cluster details. Which brokers are alive? Dead? Got stuck?
Topic configuration. Which ones, partitions, replicas, etc.
Quotas. How much each client is allowed to read/write?
ACLs. Who is allowed to read and/or write to which topic?
Old 0.8 Consumers. Offset storage and rewind operations.
Producer
Producer
Producer
Topic
Consumer
Consumer
Consumer
Kafka Cluster
Leaders Membership Metadata Quotas
Zookeeper Cluster
Kafka Design "Crash Course"
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 31
Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's

More Related Content

What's hot

Notebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and KubeflowNotebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and Kubeflow
Nick Pentreath
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
Tony Ng
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBay
Tony Ng
 
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMwareEvent Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
HostedbyConfluent
 

What's hot (20)

KFServing - Serverless Model Inferencing
KFServing - Serverless Model InferencingKFServing - Serverless Model Inferencing
KFServing - Serverless Model Inferencing
 
KFServing Payload Logging for Trusted AI
KFServing Payload Logging for Trusted AIKFServing Payload Logging for Trusted AI
KFServing Payload Logging for Trusted AI
 
MLeap: Productionize Data Science Workflows Using Spark
MLeap: Productionize Data Science Workflows Using SparkMLeap: Productionize Data Science Workflows Using Spark
MLeap: Productionize Data Science Workflows Using Spark
 
Advanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
Advanced Model Inferencing leveraging Kubeflow Serving, KNative and IstioAdvanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
Advanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
 
Running Apache Spark & Apache Zeppelin in Production
Running Apache Spark & Apache Zeppelin in ProductionRunning Apache Spark & Apache Zeppelin in Production
Running Apache Spark & Apache Zeppelin in Production
 
Beyond the Brokers | Emma Humber and Andrew Borley, IBM
Beyond the Brokers | Emma Humber and Andrew Borley, IBMBeyond the Brokers | Emma Humber and Andrew Borley, IBM
Beyond the Brokers | Emma Humber and Andrew Borley, IBM
 
Comparison of various streaming technologies
Comparison of various streaming technologiesComparison of various streaming technologies
Comparison of various streaming technologies
 
Notebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and KubeflowNotebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and Kubeflow
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
 
Kubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todosKubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todos
 
AI made easy with Flink AI Flow
AI made easy with Flink AI FlowAI made easy with Flink AI Flow
AI made easy with Flink AI Flow
 
From bytes to objects: describing your events | Dale Lane and Kate Stanley, IBM
From bytes to objects: describing your events | Dale Lane and Kate Stanley, IBMFrom bytes to objects: describing your events | Dale Lane and Kate Stanley, IBM
From bytes to objects: describing your events | Dale Lane and Kate Stanley, IBM
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBay
 
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMwareEvent Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
 
Kafka Connect and Streams (Concepts, Architecture, Features)
Kafka Connect and Streams (Concepts, Architecture, Features)Kafka Connect and Streams (Concepts, Architecture, Features)
Kafka Connect and Streams (Concepts, Architecture, Features)
 
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
 
Real-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsReal-World Pulsar Architectural Patterns
Real-World Pulsar Architectural Patterns
 

Similar to Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's

Similar to Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's (20)

Oracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudOracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the Cloud
 
Oh2 opportunity for_smart_db
Oh2 opportunity for_smart_dbOh2 opportunity for_smart_db
Oh2 opportunity for_smart_db
 
Apache Flex: Overview
Apache Flex: OverviewApache Flex: Overview
Apache Flex: Overview
 
Separation of Concerns through APIs: the Essence of #SmartDB
Separation of Concerns through APIs: the Essence of #SmartDBSeparation of Concerns through APIs: the Essence of #SmartDB
Separation of Concerns through APIs: the Essence of #SmartDB
 
Oracle - Continuous Delivery NYC meetup, June 07, 2018
Oracle - Continuous Delivery NYC meetup, June 07, 2018Oracle - Continuous Delivery NYC meetup, June 07, 2018
Oracle - Continuous Delivery NYC meetup, June 07, 2018
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
 
Confluent Developer Training
Confluent Developer TrainingConfluent Developer Training
Confluent Developer Training
 
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
 Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
 
Deployment of SAP Solutions on AWS (Level 200)
Deployment of SAP Solutions on AWS (Level 200)Deployment of SAP Solutions on AWS (Level 200)
Deployment of SAP Solutions on AWS (Level 200)
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
 
Orchestrating Machine Learning Training for Netflix Recommendations - MCL317 ...
Orchestrating Machine Learning Training for Netflix Recommendations - MCL317 ...Orchestrating Machine Learning Training for Netflix Recommendations - MCL317 ...
Orchestrating Machine Learning Training for Netflix Recommendations - MCL317 ...
 
Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118
 
Microservices Integration Patterns with Kafka
Microservices Integration Patterns with KafkaMicroservices Integration Patterns with Kafka
Microservices Integration Patterns with Kafka
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
 
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application DevelopmentMySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application Development
 
The structured streaming upgrade to Apache Spark and how enterprises can bene...
The structured streaming upgrade to Apache Spark and how enterprises can bene...The structured streaming upgrade to Apache Spark and how enterprises can bene...
The structured streaming upgrade to Apache Spark and how enterprises can bene...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
OOW16 - Oracle E-Business Suite Information Discovery: Your Journey to the Cl...
OOW16 - Oracle E-Business Suite Information Discovery: Your Journey to the Cl...OOW16 - Oracle E-Business Suite Information Discovery: Your Journey to the Cl...
OOW16 - Oracle E-Business Suite Information Discovery: Your Journey to the Cl...
 
Kafka Explainaton
Kafka ExplainatonKafka Explainaton
Kafka Explainaton
 

Recently uploaded

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 

Recently uploaded (18)

Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 

Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's

  • 1.
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's Transformation-free Data Pipelines by combining the Power of Apache Kafka and the Flexibility of the ESB's Ricardo Ferreira Principal Solutions Architect Cloud Solution Architects Team (A-Team) March 21, 2017 @jricardoferreir Building Agile and Resilient Schema Transf. using Kafka and ESB's
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Building Agile and Resilient Schema Transf. using Kafka and ESB's 3
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | • Ricardo Ferreira – Principal Solutions Architect, Oracle Building Agile and Resilient Schema Transf. using Kafka and ESB's 4 • Freaking nerd, proud husband and father • I have been writing code since 1997 • Currently working in the Oracle A-Team • Author of couple Kafka-based projects:  Service Bus Transport for Kafka  Stream Explorer Adapter for Kafka @jricardoferreir Who am I ?
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | API changes, Transformations and Decoupling Hands-on Demonstration using the Oracle Cloud Why Apache Kafka instead of other Options? 1 2 3 Building Agile and Resilient Schema Transf. using Kafka and ESB's 5 Agenda
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Wait… did you say ESB's? Aren't they evil? • Modern Cloud-Native applications are built on top of design principles that doesn't include ESB's. One of them is the Smart endpoints and Dumb Pipes Building Agile and Resilient Schema Transf. using Kafka and ESB's 6 Service A Service BusService B Service C Service D Service E Service F
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Wait… did you say ESB's? Aren't they evil? • Modern Cloud-Native applications are built on top of design principles that doesn't include ESB's. One of them is the Smart endpoints and Dumb Pipes Building Agile and Resilient Schema Transf. using Kafka and ESB's 7 Service A Service BusService B Service C Service D Service E Service F
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Smart Endpoints and Dump Pipes • Let the endpoints handle the transformation logic required to expose and/or invoke other endpoints. Pipes must only carry the messages in/out. Building Agile and Resilient Schema Transf. using Kafka and ESB's 8 Service A Service B REST or Messaging
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 9 Wait… but what if the API changes?
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | We might have some options. And along with… trade-offs Widely accepted solution among the developer community, but it is not bullet-proof and creates lots of code and operational overhead. Jamie Zawinski's used to say: - "I'll use versioning. Now you have 2.1.0 problems." Effective but relies on the assumption that developers must coordinate to handle the API changes. This might work for certain cases, but is reactive and creates organization overhead. It creates a more complex architecture upfront but handle changes almost on- the-fly and allows services to react with higher uptime while teams coordinate to evolve their systems. Building Agile and Resilient Schema Transf. using Kafka and ESB's 10 Service Versioning Deployment Pipelines Design for Change Principle
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Design for Change Principle • Whenever possible, exchange messages using messaging technologies. This allows you to decouple the communication while providing a way to filter and correct message schemas. Use REST for synchronous use cases only. Building Agile and Resilient Schema Transf. using Kafka and ESB's 11 Phase 1 :: Leveraging messaging in-between microservices Service A Service B Messaging using Topics Benefits of this design:  Messages will never be lost.  Reliability while maintenance.  Possibility of schema handling  UI-ready using reactive coding  Scalability using less hardware
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Design for Change Principle • API providers hook up directly while API consumers hook up indirectly. By using different message channels you can plugin schema transformations on-the-fly. By default, just perform messages pass-through. Building Agile and Resilient Schema Transf. using Kafka and ESB's 12 Phase 2 :: Allow schema transformation by foreseen message channels Service A Service B Two topics per service
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Design for Change Principle • When the time comes and your service API need to be changed, simply do the change and allow a third-party service to handle the schema evolution. This service responsibility is exclusively handle schemas. Ring any bells?  Building Agile and Resilient Schema Transf. using Kafka and ESB's 13 Phase 3 :: Plugin schema transformation engines on-the-fly Service A Service B Two topics per service Transformation Service ("A.K.A Service C") This can be implemented in a variety of ways but using ESB's seems to be a natural fit. If this is a one time thing, then maybe Serverless could work.
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | API changes, Transformations and Decoupling Hands-on Demonstration using the Oracle Cloud Why Apache Kafka instead of other Options? 1 2 3 Building Agile and Resilient Schema Transf. using Kafka and ESB's 14 Agenda
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Understanding the "Use Case" Building Agile and Resilient Schema Transf. using Kafka and ESB's 15
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | More specifically... this use case is about the Saviors/Negan Building Agile and Resilient Schema Transf. using Kafka and ESB's 16
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Collecting Supplies from the Communities Building Agile and Resilient Schema Transf. using Kafka and ESB's 17 Supplies Collection Scavenge Lesson Teaching • Is it time to collect? • What do we need? • Half of their assets? • Check Inventory • Check their Demands • Do scavenging… • Is 50% of their assets? • There was disrespect? • Is Lucille angry?
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Services Design :: First Iteration Building Agile and Resilient Schema Transf. using Kafka and ESB's 18 Supplies Collection Service Scavenge Service Lesson Teaching Service Initiator Service
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Services Design :: Second Iteration Building Agile and Resilient Schema Transf. using Kafka and ESB's 19 Supplies Collection Service Scavenge Service Lesson Teaching Service Initiator Service Topic Topic Topic
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Services Design :: Third Iteration Building Agile and Resilient Schema Transf. using Kafka and ESB's 20 Supplies Collection Service Scavenge Service Lesson Teaching Service Initiator Service Topic Service Bus Topic Topic Service Bus TopicTopic Service Bus Topic Topic Service Bus Topic Design for Change Principle
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Services Design :: Fourth Iteration Building Agile and Resilient Schema Transf. using Kafka and ESB's 21 Supplies Collection Service Scavenge Service Lesson Teaching Service Initiator Service Topic Service Bus Oracle Java Cloud Service Oracle SOA Cloud Service Topic Oracle IaaS Cloud Service Kafka Transport
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 22 Enough slides, show me code
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Do you want to win a Negan Souvenir? http://141.144.29.149:8080/oracle-code-2017/collectSupplies?name=XYZ Building Agile and Resilient Schema Transf. using Kafka and ESB's 23 { "timestamp" : "MM/dd/yyyy hh:mm:ss", "requestorName" : "XYZ", "outcome" : true }
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | API changes, Transformations and Decoupling Hands-on Demonstration using the Oracle Cloud Why Apache Kafka instead of other Options? 1 2 3 Building Agile and Resilient Schema Transf. using Kafka and ESB's 24 Agenda
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | What is Apache Kafka? • Simply Put, Kafka is a Distributed Streaming Platform – Allows ingestion and consumption of streams of records – Allows streams of records to be persisted with fault tolerance – Allows streams of records to be processed as they happen • It is Comprised of Six Main Modules: – Kafka Cluster – Producer API Building Agile and Resilient Schema Transf. using Kafka and ESB's 25 – Consumer API – Connector API – Streams API – REST Proxy *
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Kafka Design "Crash Course" • For implementation simplicity; Kafka does not support the concept of many destinations, topics are the only abstraction. However, both Queuing and Pub/Sub scenarios are supported. • In Kafka, Queuing is just a matter of how consumers are grouped together. Building Agile and Resilient Schema Transf. using Kafka and ESB's 26 • Each consumer has a property called group id. When two (or more) consumers has the same group id value, that means that they belong to the same group. • Consumers belonging to the same group will load balance themselves to fetch records from the partition.
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Kafka Design "Crash Course" • The basic abstraction in Kafka is called topics. • Queue and Pub/Sub scenarios are supported. • Topics are broken down in multiple partitions. • Partitions are spread over the Kafka cluster. Building Agile and Resilient Schema Transf. using Kafka and ESB's 27 • Each partition is an ordered, immutable sequence of records that is continuously appended to a structured commit log. • Committed records has an offset that uniquely identifies it within the partition.
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Kafka Design "Crash Course" • Each partition has an ever-growing commit log. • A log can be simply view as a list of linked files. • Partition logs always carries the topic name and the identifier of the partition (i.e.: "topic-0") Building Agile and Resilient Schema Transf. using Kafka and ESB's 28 • Kafka's commit log has been designed for maximum efficiency, therefore: File journaling (O1 structures) may be faster than RAM There is no JVM caching. Page Caching is used instead Zero-copy transfer: CPU offloading using sendfile()
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Kafka Design "Crash Course" • As mentioned before, Kafka supports fault tolerance. That is achieved with the concept of replication. Replication happens in a per partition basis. Building Agile and Resilient Schema Transf. using Kafka and ESB's 29 • Partition backups are spread over the cluster based on the number defined in the replication factor. • When replication is in place, one broker is elected to be the leader of a given partition. Only leaders can read/write records. The rest of the brokers (hosting replicas) are called followers or ISR's.
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | • Any Kafka deployment must include a Zookeeper setup. That is mandatory. Therefore, it is important to understand what role Zookeeper plays in Kafka. Building Agile and Resilient Schema Transf. using Kafka and ESB's 30 • Zookeeper is used to store lots of metadata: Controllers election. Keeps track of leaders and followers. Cluster details. Which brokers are alive? Dead? Got stuck? Topic configuration. Which ones, partitions, replicas, etc. Quotas. How much each client is allowed to read/write? ACLs. Who is allowed to read and/or write to which topic? Old 0.8 Consumers. Offset storage and rewind operations. Producer Producer Producer Topic Consumer Consumer Consumer Kafka Cluster Leaders Membership Metadata Quotas Zookeeper Cluster Kafka Design "Crash Course"
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Building Agile and Resilient Schema Transf. using Kafka and ESB's 31