Taking the hippie bus to the enterprise GOTO Aarhus September 30th - - PowerPoint PPT Presentation

taking the hippie bus to the enterprise
SMART_READER_LITE
LIVE PREVIEW

Taking the hippie bus to the enterprise GOTO Aarhus September 30th - - PowerPoint PPT Presentation

Taking the hippie bus to the enterprise GOTO Aarhus September 30th 2013 Mogens Heller Grabe mhg@d60.dk http://mookid.dk/oncode @mookid8000 What? What's your problem? Meet Rebus Examples Wrap up How? Slides Talk 4 demos What's your


slide-1
SLIDE 1

Taking the hippie bus to the enterprise

GOTO Aarhus September 30th 2013

slide-2
SLIDE 2

Mogens Heller Grabe mhg@d60.dk http://mookid.dk/oncode @mookid8000

slide-3
SLIDE 3

What?

What's your problem? Meet Rebus Examples Wrap up

slide-4
SLIDE 4

How?

Slides Talk 4 demos

slide-5
SLIDE 5

What's your problem?

slide-6
SLIDE 6

Big system

size

slide-7
SLIDE 7

Integration with external parties

(uhm hello? anybody out there?)

slide-8
SLIDE 8

Complex logic

Stuff that makes stuff happen ...that makes other stuff happen ...that makes other stuff happen ...then waits for a while ...then other stuff happens (you probably get it)

slide-9
SLIDE 9

Problem summary

Monolith Integration Coordination

slide-10
SLIDE 10

The solution: Messaging

(and by "the" I mean "a")

slide-11
SLIDE 11

Messaging via durable, asynchronous queues

slide-12
SLIDE 12

Windows FTW!!1

slide-13
SLIDE 13

Meet Rebus

slide-14
SLIDE 14

"Service bus"?

slide-15
SLIDE 15

"Hippie bus"?

slide-16
SLIDE 16

No, seriously - what is it?

Messaging library Layer on top of MSMQ One single .NET 4 DLL Additional DLLs if you want

RabbitMQ RavenDB MongoDB Castle Windsor StructureMap Unity Autofac Ninject Log4net NLog ...

slide-17
SLIDE 17

Motivation

I really like NServiceBus Can't use NServiceBus where I want to though Sometimes I lost my patience with NServiceBus Wanted to use MassTransit Wanted to fork NServiceBus when it was still Apache V2

slide-18
SLIDE 18

Philosophy

Free Easy

slide-19
SLIDE 19

Meta

3700 lines of C# 4 Code on GitHub: Has contributions from 12 developers besides me Binaries available via NuGet Current version: 0.43.1 Has been moving money around since 0.14-alpha Has controlled power plants since 0.17-alpha https://github.com/rebus-org/Rebus http://nuget.org/packages?q=rebus

slide-20
SLIDE 20

Good to know

Messages are POCOs Each Rebus endpoint has its own input queue Each message type is owned by one logical service

slide-21
SLIDE 21

Demo 0

slide-22
SLIDE 22
slide-23
SLIDE 23

Examples

The three problems I talked about

  • 1. System that's becoming too big
  • 2. Integration with external parties
  • 3. Complex logic with coordination and timing
slide-24
SLIDE 24

1st problem

System that's becoming too big

Summary: We're building a trading platform where traders in "front office" strike deals with counterparts and record their trades, while administrative personnel in "back office" make sure that the counterparts are charged.

slide-25
SLIDE 25

Cues

ubiquitous language bounded context distributed domain-driven design

slide-26
SLIDE 26

Demo 1

Split into separate Trading and Billing systems

slide-27
SLIDE 27

2nd problem

Integration with external party

Summary: When new trades are made, "middle office" needs to confirm all trades, e.g. depending on the current credit status of the counterpart. Credit status can be retrieved by querying the CreditAssessment SOAP service.

slide-28
SLIDE 28

Cues

asynchronous reliable automatic retries

slide-29
SLIDE 29
slide-30
SLIDE 30

Demo 2

Web service calls via messaging facade

slide-31
SLIDE 31

3rd problem

Complex coordination and timing

Billing needs to charge the customer, but it can be optimized by sending one big invoice if the credit status is OK. Therefore, when trades are made, billing awaits confirmations' judgment to determine invoicing terms. To avoid "forgetting" to send invoices in case something goes wrong, we want to take action if the automated invoicing is not complete within 10 seconds.

slide-32
SLIDE 32

Cues

process manager timeouts compensating actions

slide-33
SLIDE 33
slide-34
SLIDE 34

Demo 3

Complex logic, coordination, timing

slide-35
SLIDE 35

Summary

Messaging provides a model that can... help you glue the pieces together when you break down a system into bounded contexts help you overcome glitches when you depend on stuff that you do not control be used to make processes explicit by correlating events

slide-36
SLIDE 36

Stuff I didn't show

Can also use RabbitMQ, Azure Service Bus, and SQL Server as transports Can store subscriptions and sagas in SQL Server, RavenDB, and MongoDB Can activate handlers with Castle Windsor, StructureMap, Autofac, Ninject, and Unity Can log with NLog and Log4Net Can send messages in batches Can do handler pipeline re-ordering Can do polymorphic dispatch Can encrypt message bodies Can compress message bodies

slide-37
SLIDE 37

What now?

1.0 Central monitoring HTTP gateway Additional transports Distributor

slide-38
SLIDE 38

Litterature

slide-39
SLIDE 39

Want to read more?

Check out the work & words of Udi Dahan, Greg Young, Dan North, Rinad Abdullin etc.

slide-40
SLIDE 40

Thank you for listening!

...and a big thank you to for creating the immensely awesome Mogens Heller Grabe

Hakim reveal.js Code samples on GitHub mhg@d60.dk @mookid8000 http://mookid.dk/oncode