it's full of stars - building, measuring and learning with events

30
IT’S FULL OF STARS BUILDING, MEASURING AND LEARNING WITH EVENTS Brent Snook - @brentsnook

Upload: fuglylogic

Post on 16-Apr-2017

293 views

Category:

Software


0 download

TRANSCRIPT

IT’S FULL OF STARSBUILDING, MEASURING AND LEARNING WITH EVENTS

Brent Snook - @brentsnook

@brentsnook

What is the bank balance?

@brentsnook

Jeena deposited $100

Mal withdrew $50

Bron withdrew $60

Overdrawn fee charged of $2

Mal deposited $50

Account

Balance: $ 38

What is the bank balance?

@brentsnook

How much has been charged in fees?

Account

Balance: $ 38

@brentsnook

@brentsnook

we know that there are known knowns

but there are also unknown unknowns

How are we going to use our data?

(the ones we don’t know we don’t know)

@brentsnook

yourdata

hoard

@brentsnook

e e

e

ee

e

ee

ee

ee

e

e

e

e

e e

e

e

ee

ee

eee

e

ee

e

e

ee

e

e

ee

correlation

@brentsnook

projectione

e

ee

eee

e

e

e

@brentsnook

projectione

e

ee

eee

e

e

e

@brentsnook

projectione

e

ee

eee

e

e

e

@brentsnook

@brentsnook

LE POULPE COLOSSAL

or

L’INTÉGRATION VIA

LA BASE DE DONNÉES

Pierre Dénys de Montfort

1801

@brentsnook

Anatomy of an Event

{ "eventId": "F59774E7", "sequenceId": 237893473, "eventType": "withdrawalSuccess", "createdAt": "2016-04-02 23239230", "aggregateId": "5B7D5971", "metadata": { "correlationIds": [ "CD5B3E20", "D12C18B7" ] }, "data": { "1.0": { "accountId": "6CEB2C11", "money": { "currency": "AUD", "amount": "34.45" } } } }

@brentsnook

request collaboration

A B C D

@brentsnook

request collaboration

A B C D

@brentsnook

event collaboration

A B C D

@brentsnook

event collaboration

A B C D

@brentsnook

event collaboration

A B C De

e

@brentsnook

event collaboration

A B C De

e

e

e

e

@brentsnook

SPLITTING THE MONOLITH

@brentsnook

SPLITTING THE MONOLITH• EMIT EVENTS AT KEY PARTS OF THE PROCESS

e e

@brentsnook

SPLITTING THE MONOLITH• EMIT EVENTS AT KEY PARTS OF THE PROCESS• REACT TO THEM TO ADD EVENT-DRIVEN SEAMS

e e

@brentsnook

SPLITTING THE MONOLITH• EMIT EVENTS AT KEY PARTS OF THE PROCESS• REACT TO THEM TO ADD EVENT-DRIVEN SEAMS• MOVE RESPONSIBILITY BETWEEN TWO SEAMS INTO A NEW SERVICE

e e

@brentsnook

SPLITTING THE MONOLITH• EMIT EVENTS AT KEY PARTS OF THE PROCESS• REACT TO THEM TO ADD EVENT-DRIVEN SEAMS• MOVE RESPONSIBILITY BETWEEN TWO SEAMS INTO A NEW SERVICE• REPEAT

e e

@brentsnook

e e e e e e e e e e e e e e e e

Event Bus

MY GOD, IT ’S FULL OF EVENTS …

ATM Query

Event Store Billing

Internet Banking Web UI

Internet Banking

API

Reports

User Mgmt. Accounts

Paper Mail

@brentsnook

C H A L L E N G E S

@brentsnook

Q U E S T I O N S ?

@brentsnook

REFERENCES/FURTHER READING• Event Collaboration

• http://martinfowler.com/eaaDev/EventCollaboration.html • Event Sourcing

• http://martinfowler.com/eaaDev/EventSourcing.html • https://www.thoughtworks.com/radar/techniques/event-sourcing

• Greg Young - Event Sourcing Talk at Code on the Beach 2014 • https://www.youtube.com/watch?v=JHGkaShoyNs

• Command/Query Responsibility Segregation (CQRS) • http://martinfowler.com/bliki/CQRS.html

• Domain Driven Design incl. Aggregates, Bounded Contexts and Anti-Corruption Layers • https://www.infoq.com/minibooks/domain-driven-design-quickly • http://martinfowler.com/bliki/DDD_Aggregate.html • http://martinfowler.com/bliki/BoundedContext.html

http://www.markhneedham.com/blog/2009/07/07/domain-driven-design-anti-corruption-layer/ • Event Storming

• http://ziobrando.blogspot.com.au/2013/11/introducing-event-storming.html • Seams

• http://www.informit.com/articles/article.aspx?p=359417&seqNum=2 • Software Entropy

• https://en.wikipedia.org/wiki/Software_entropy • AWS Technologies

• https://aws.amazon.com/kinesis/streams/ • https://aws.amazon.com/sqs/ • https://aws.amazon.com/sns/ • https://aws.amazon.com/lambda/details/

@brentsnook

IMAGES• Images from “2001 - A Space Odyssey”

• COPYRIGHT © Metro-Goldwyn-Mayer Inc.; 3 April 1968; LP36136 (in copyright registry) • © Renewed 1996 by Turner Entertainment Company

• Images from”Willy Wonka and the Chocolate Factory” • COPYRIGHT © MCMLXXI BY WOLPER PICTURES, LTD. AND THE QUAKER OATS COMPANY ALL RIGHTS RESERVED • © Renewed 1999 by Warner Bros., a division of Time Warner Entertainment Company, LP

• Rumsfeld • https://commons.wikimedia.org/wiki/File:Donald_Rumsfeld_Defenselink.jpg

• Cluttered Store • https://www.flickr.com/photos/tallkev/4082110101/

• Le Poulpe Colossal • https://commons.wikimedia.org/wiki/File:Histoire_naturelle,_g%C3%A9n%C3%A9rale_et_particuli%C3%A8re_des_mollusques_(6261008252).jpg

• Dominoes • https://www.flickr.com/photos/daxx13/6289764937/

• Stars • https://www.flickr.com/photos/122323654@N05/15024418586/

• Waterfall • https://www.flickr.com/photos/btf5/13958611932/

• Heart • http://thegraphicsfairy.com/wp-content/uploads/2013/02/Anatomy-Heart-Images-Vintage-GraphicsFairy1.jpg

• Bear 1 • https://www.flickr.com/photos/deischi/7765087960/

• Bear 2 • https://www.flickr.com/photos/usfws_alaska/8384015991/

• Bear 3 • https://www.flickr.com/photos/deischi/7765098472/

• Bear 4 • https://www.flickr.com/photos/deischi/7765062054/

• Bucket Brigade • http://digital.library.upenn.edu/women/brody/fire/4-100.jpeg • Big Fire Engine Book by Virginia Brody (fl.1960), Illustrations by Mazoujian. New York, McGraw-Hill, 1958. Copyright not renewed.

• Paper Background • https://www.flickr.com/photos/schmod/419640051

• Database • https://commons.wikimedia.org/wiki/File:Database.svg

• Cloud • https://commons.wikimedia.org/wiki/File:Emojione_2601.svg @brentsnook