taking the hippie bus to the enterprise
DESCRIPTION
TRANSCRIPT
![Page 1: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/1.jpg)
Taking thehippie bus tothe enterprise
Warm Crocodile Developer Conference 2013
![Page 2: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/2.jpg)
Mogens Heller Grabe
http://mookid.dk/oncode
@mookid8000
![Page 3: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/3.jpg)
What?What's your problem?Meet RebusExamplesWrap up
![Page 4: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/4.jpg)
How?SlidesTalk4 demos
![Page 5: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/5.jpg)
![Page 6: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/6.jpg)
What's yourproblem?
![Page 7: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/7.jpg)
Big system
size
![Page 8: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/8.jpg)
Integration with externalparties
(uhm hello? anybody out there?)
![Page 9: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/9.jpg)
Complex logicStuff 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)
![Page 10: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/10.jpg)
Problem summaryMonolithIntegrationCoordination
![Page 11: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/11.jpg)
The solution: Messaging
(and by "the" I mean "a")
![Page 12: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/12.jpg)
Messaging via durable,asynchronous queues
![Page 13: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/13.jpg)
Windows FTW!!1
![Page 14: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/14.jpg)
![Page 15: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/15.jpg)
Meet Rebus
![Page 16: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/16.jpg)
"Service bus"?
![Page 17: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/17.jpg)
"Hippie bus"?
![Page 18: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/18.jpg)
No, seriously - what is it?Messaging libraryLayer on top of MSMQOne single .NET 4 DLLAdditional DLLs if you want RabbitMQ
RavenDBMongoDBCastle WindsorStructureMapUnityAutofacNinjectLog4netNLog...
![Page 19: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/19.jpg)
MotivationI really like NServiceBusCan't use NServiceBus where I want to thoughSometimes I lost my patience with NServiceBusWanted to use MassTransitWanted to fork NServiceBus when it was still Apache V2
![Page 20: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/20.jpg)
PhilosophyFreeEasy
![Page 21: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/21.jpg)
Meta3000 lines of C# 4Code on GitHub:
Has contributions from 7 developers besides meBinaries available via NuGet
Current version: 0.28.3Has been moving money around since 0.14-alphaHas controlled power plants since 0.17-alpha
https://github.com/mookid8000/Rebus
http://nuget.org/packages?q=rebus
![Page 22: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/22.jpg)
Good to knowMessages are POCOsEach logical service/endpoint/process has its own input queueEach message type is owned by one logical service
![Page 23: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/23.jpg)
Demo 0
![Page 24: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/24.jpg)
![Page 25: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/25.jpg)
ExamplesThe three problems I talked about
1. System that's becoming too big2. Integration with external parties3. Complex logic with coordination and timing
![Page 26: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/26.jpg)
1st problemSystem that's becoming too big
Summary: We're building a trading platform where traders in "front office" strike deals with counterpartsand record their trades, while administrative personnel in "back office" make sure that the counterparts
are charged.
![Page 27: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/27.jpg)
Cuesubiquitous languagebounded contextanti-corruption layerdistributed domain-driven design
![Page 28: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/28.jpg)
Demo 1Split into separate Trading and Billing systems
![Page 29: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/29.jpg)
2nd problemIntegration with external party
Summary: When new trades are made, "middle office" needs to confirm all trades, e.g. depending on thecurrent credit status of the counterpart. Credit status can be retrieved by querying the CreditAssessment
SOAP service.
![Page 30: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/30.jpg)
Cuesasynchronousreliableautomatic retries
![Page 31: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/31.jpg)
Demo 2Web service calls via messaging facade
![Page 32: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/32.jpg)
3rd problemComplex coordination and timing
Billing needs to charge the customer, but it can be optimized by sending one big invoice if the credit statusis 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 theautomated invoicing is not complete within 10 seconds.
![Page 33: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/33.jpg)
Cuesprocess managertimeoutscompensating actions
![Page 34: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/34.jpg)
![Page 35: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/35.jpg)
Demo 3Complex logic, coordination, timing
![Page 36: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/36.jpg)
![Page 37: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/37.jpg)
Stuff I didn't showCan use MSMQ and RabbitMQ as transportsCan store subscriptions and sagas in SQL Server, RavenDB,and MongoDBCan activate handlers with Castle Windsor, StructureMap,Autofac, Ninject, and UnityCan log with NLog and Log4NetCan send messages in batchesCan do handler pipeline re-orderingCan do polymorphic dispatchCan encrypt message bodies
![Page 38: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/38.jpg)
What now?1.0Central monitoringHTTP gatewayAdditional transports (e.g. Azure Service Bus)Distributor
![Page 39: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/39.jpg)
Litterature
![Page 40: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/40.jpg)
Want to read more?Check out the work of Udi Dahan, Greg Young, Dan North, Rinad
Abdullin etc.
![Page 41: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/41.jpg)
![Page 42: Taking the hippie bus to the enterprise](https://reader034.vdocuments.us/reader034/viewer/2022051514/5496129aac79593b2e8b4fd3/html5/thumbnails/42.jpg)
Thank you for listening!...and a big thank you to for creating the immensely awesome
Mogens Heller Grabe
...and a big thanks to for the cute and inspirational artwork
Hakim reveal.js
@mookid8000
http://mookid.dk/oncode
Silly Dog Hats