Slide 1

Slide 1 text

Beyond the Buzzwords: Microservices and Event-Driven Architecture with Apache Kafka on Heroku Ryan Townsend SHIFT Commerce CTO Chris Castle Heroku Developer Advocate

Slide 2

Slide 2 text

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Statement under the Private Securities Litigation Reform Act of 1995 Forward-Looking Statement

Slide 3

Slide 3 text

Why are we here? @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 4

Slide 4 text

Anxiety @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 5

Slide 5 text

Monoliths and Microservices @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 6

Slide 6 text

“There is no industry consensus yet regarding the properties of microservices, and an official definition is missing as well.”
 - Wikipedia @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 7

Slide 7 text

[email protected] Ryan Townsend, CTO [email protected] Chris Castle, Developer Advocate @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 8

Slide 8 text

20 minutes No time for questions! @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 9

Slide 9 text

Why the hype around microservices? @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 10

Slide 10 text

All the cool kids are doing it @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 11

Slide 11 text

But what are the real benefits? @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 12

Slide 12 text

@ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Strong Module Boundaries Independent Deployment Technology Diversity Source: Martin Fowler, ThoughtWorks

Slide 13

Slide 13 text

If this isn’t you, that’s ok! @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 14

Slide 14 text

Because there is a price to pay @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 15

Slide 15 text

Data / Functionality Distribution Eventual Consistency Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Source: Martin Fowler, ThoughtWorks

Slide 16

Slide 16 text

How do we mitigate these? @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 17

Slide 17 text

Demo Time! @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 18

Slide 18 text

Solution: Data / Functionality Distribution @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 19

Slide 19 text

Solution: Data / Functionality Distribution @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 n * (n-1) / 2 Max possible connections

Slide 20

Slide 20 text

Solution: Data / Functionality Distribution @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Source: AWS

Slide 21

Slide 21 text

Solution: Data / Functionality Distribution Digital Asset Management Product Information Management Upload product-123.jpg! Admin Panel Photographer Database or Search Index Merchandiser @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Chronological Event Stream (Kafka) Uploaded Event What images can I attach to my products? Uploaded Event Add image to index

Slide 22

Slide 22 text

Solution: Eventual Consistency Digital Asset Management Product Information Management Delete product-123.jpg! Admin Panel Photographer Merchandiser @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Event Create Product #123 with product-123.jpg Event Send to trash Event Untrash Admin Panel Chronological Event Stream (Kafka)

Slide 23

Slide 23 text

Start with monolith and extract pieces – build up your maturity Solution: Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 24

Slide 24 text

Cost of engineers vs cost of Heroku Solution: Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Opportunity Cost!

Slide 25

Slide 25 text

Maturity of engineers vs maturity of Heroku Solution: Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 26

Slide 26 text

Simplicity of using Apache Kafka in Heroku Solution: Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 27

Slide 27 text

• Start with a monolith and break out services from there • Use Heroku ¯\_(ツ)_/¯ • Isolate consistency concerns • Ensure each service is self- serving
 e.g. own data stores • Handle via UI, acknowledgement • Use event stream
 e.g. Apache Kafka Distribution Eventual Consistency Operational Complexity @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 28

Slide 28 text

How the approach grows @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 29

Slide 29 text

@ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Streaming Platform Store 1 Store 2 Online Store Distribution Centre Online Marketing POS Stream Inventory Stream Remarketing Stream Retail Monitoring Reporting Data Warehouse Inventory Service Logistics Service Purchasing Service Profile Update Service Remarketing Service Source: Confluent

Slide 30

Slide 30 text

@ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Source: AWS

Slide 31

Slide 31 text

Elephant in the room: Scaling @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2

Slide 32

Slide 32 text

@ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 Monoliths can scale more than you might think… e.g.

Slide 33

Slide 33 text

take a photo of this slide, or download at https://bit.ly/2zx3TW2 @ryantownsend / @crc Slides: https://bit.ly/2zx3TW2 • Last year’s talk - more on Event Streams
 https://hrku.co/df17-event-streams • Microservices Resource Guide
 https://hrku.co/microservices-guide • Deconstructing Monolithic Applications into Services
 https://hrku.co/deconstructing-monoliths • How Small Should Your Microservices Be?
 https://hrku.co/microservice-sizing Next Steps Summary • Monoliths are okay - microservices aren’t a silver bullet • Start with a monolith - migrate as a journey not a single project • Having a centralised source of truth will set you up for success - Apache Kafka is a great solution • Heroku makes it quick and easy to get started and provides the DevOps maturity

Slide 34

Slide 34 text

No content