SlideShare une entreprise Scribd logo
1  sur  61
Télécharger pour lire hors ligne
Advanced 
NServiceBus 
Deployment 
NSBCon NYC 2014 
Kijana Woodard / @kijanawoodard
Background 
From Dallas, TX 
Professional develop since 1996 
.net since 1.0 
Independent contractor since 2010
Around the web 
kijanawoodard.com 
twitter.com/kijanawoodard 
github.com/kijanawoodard 
linkedin.com/in/kijanawoodard 
particular forum 
ravendb forum 
ddd/cqrs forum 
hypermedia forum
Slides are on GitHub 
github.com/kijanawoodard/NSBCon-NYC-2014/
Mitigation 
all 
the 
way 
down
Big Ball of Mud 
An application which defies modification
BBOM Formal Definition 
SELECT currentAssignment 
FROM workHistory 
WHERE originalDeveloper != me
Defense Mechanisms 
Change control committee 
Source control committee
BBOM Architecure 
- thedailywtf.com Comment On The Enterprise Dependency
BBOM Implementation 
public class OrderController 
{ 
... 
public OrderController( 
IOrderRepository orders, 
IBillingService billing, 
IShippingService shipping) 
{ 
_orders = orders; 
_billing = billing; 
_shipping = shipping; 
} 
public HttpStatusCode Post(Order order) 
{ 
_orders.Save(order.OrderDetails); 
_billing.Charge(order.BillingDetails); 
_shipping.Ship(order.ShippingDetails); 
return HttpStatusCode.OK; 
} 
}
Mediator 
kijanawoodard.com/introducing-nimbus 
lostechies.com/jimmybogard/2014/09/09/tackling-cross-cutting- 
concerns-with-a-mediator-pipeline/
Decouple through Events
Events Implementation 
public class OrderController 
{ 
public IBus Bus { get; set; } 
public HttpStatusCode Post(ProcessOrder order) 
{ 
Bus.Send(order); 
return HttpStatusCode.OK; 
} 
} 
... 
public class OrderHandler 
: IHandleMessages<ProcessOrder> 
{ 
public IBus Bus { get; set; } 
public void Handle(ProcessOrder message) 
{ 
//save order... 
Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); 
} 
}
Bliss 
Encapsulation 
Single Responsibility 
Open Closed Principle 
Interface Segregation Principle 
Dependency Inversion Principle
It's almost as if... 
OOP to me means only messaging, local 
retention and protection and hiding of state-process, 
and extreme late-binding of all things. 
Alan Kay - 2003
What's the Problem?
BBOM Solution
Events Solution
Events Dev UX
Friction 
Message Conventions 
Serialization Format 
Persistence Configuration
Harder to Deploy 
Many Endpoints vs One Application
Decreased Legibility 
ribbonfarm.com/2010/07/26/a-big-little-idea-called-legibility/
Developer's Opinion of 
BBOM 
- thedailywtf.com Comment On The Enterprise Dependency
Executive Summary of 
BBOM
Executive Summary of 
Messaging
Combat Friction
Don't Call It a Rewrite 
public class OrderController 
{ 
... 
public OrderController( 
IOrderRepository orders, 
IBillingService billing, 
IShippingService shipping) 
{ 
_orders = orders; 
_billing = billing; 
_shipping = shipping; 
} 
public HttpStatusCode Post(Order order) 
{ 
_orders.Save(order.OrderDetails); 
_billing.Charge(order.BillingDetails); 
_shipping.Ship(order.ShippingDetails); 
return HttpStatusCode.OK; 
} 
}
Strangler Pattern 
- Entry on Strangler Fig Wikipedia 
http://www.martinfowler.com/bliki/StranglerApplication.html
Context 
Remember that time when we couldn't deploy anything for 6 
weeks... 
Remember that time when the strategic marketing initiative 
was held up due to a Shipping upgrade...
Restore some Legibility
Have No Illusions 
The Big Ball of Mud will not die easily 
- Advanced Life Skills
Automate 
Automate 
Automate
Conventions: Web vs Endpoint 
Separate configuration repo 
Days to Minutes 
Smaller, more frequent releases 
Confidence 
Repeatability
Configuration 
db alert 
local http://localhost:8080 alerts@devnull.example.com 
dev http://localhost:8080 alerts@dev.example.com 
qa http://qa:8080 alerts@qa.example.com 
prod http://p532977:8080 alerts@example.com
Don't Do an 
"Automation Project" 
Over time, layer in... 
Build scripts 
powershell / msbuild 
Team City / Bamboo 
Deploy scripts 
powershell 
Octopus Deploy 
Monitoring and Metrics 
Service Insight / Control 
SCOM 
Discussion on DevOPS Experience on devopslive.org
Bus Stop 
github.com/andreasohlund/BusStop
Bus Stop 
namespace BusStop.Config 
{ 
public static class MyConvention 
{ 
public static Configure MyMessageConventions(this Configure config) 
{ 
config.DefiningEventsAs(t => t.Namespace != null && 
t.Namespace.EndsWith(".Contracts")); 
return config; 
} 
} 
} 
github.com/andreasohlund/BusStop
Endpoints vs Handlers
Before
All Together
Combined
Dev UX
Build Artifacts
Mix and Match
Run 
NServiceBus.Host.exe -endpointName=orders
Decouple Dev from OPS 
Redeploy without recompile 
Tie to Platform Tools
Pushing Forwards
A 2nd Look at Events Impl 
public class OrderController 
{ 
public IBus Bus { get; set; } 
public HttpStatusCode Post(ProcessOrder order) 
{ 
Bus.Send(order); 
return HttpStatusCode.OK; 
} 
} 
... 
public class OrderHandler 
: IHandleMessages<ProcessOrder> 
{ 
public IBus Bus { get; set; } 
public void Handle(ProcessOrder message) 
{ 
//save order... 
Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); 
} 
}
One Choice 
public class OrderController 
{ 
private IFactory<Duck<Mockable<ProcessOrder>>> _something; 
public IBus Bus { get; set; } 
public OrderController(IFactory<Duck<Mockable<ProcessOrder>>> something) 
{ 
_something = something; 
} 
public HttpStatusCode Post(ProcessOrder order) 
{ 
_something.Process(order); 
return HttpStatusCode.OK; 
} 
} 
... 
public class OrderHandler 
: IHandleMessages<ProcessOrder> 
{ 
private IFactory<Duck<Mockable<ProcessOrder>>> _something; 
public IBus Bus { get; set; } 
public OrderHandler(IFactory<Duck<Mockable<ProcessOrder>>> something) 
{ 
_something = something; 
} 
public void Handle(ProcessOrder message) 
{
Exploit Decoupling 
public class OrderController 
{ 
private readonly IHandleMessages<ProcessOrder> _handler; 
public IBus Bus { get; set; } 
public OrderController(IHandleMessages<ProcessOrder> handler) 
{ 
_handler = handler; 
} 
public HttpStatusCode Post(ProcessOrder order) 
{ 
_handler.Handle(order); 
return HttpStatusCode.OK; 
} 
} 
... 
public class OrderHandler 
: IHandleMessages<ProcessOrder> 
{ 
public IBus Bus { get; set; } 
public void Handle(ProcessOrder message) 
{ 
//save order... 
Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); 
} 
}
Run
Subscriptions
Subscribed
Direct
Future exploration
Break Apart the API? 
Later.... 
{ 
"submit-order" : "http://api.example.com/orders" 
} 
{ 
"submit-order" : "http://orders.example.com/" 
} 
HAL - Hypertext Application Language
What about queries? 
N fanout queries vs 1 for command 
Volatile queues 
Could work with proper circuit breakers 
Easier configuration with mulitple databases
Assembly Neutral 
Interfaces 
davidfowl.com/assembly-neutral-interfaces/ 
Consumer Driven Contracts
Roslyn 
What if source files were distrbuted....
THE END
Advanced NServiceBus 
Deployment 
Questions? 
slides @ github.com/kijanawoodard/NSBCon-NYC-2014/ 
kijanawoodard.com 
twitter.com/kijanawoodard

Contenu connexe

Similaire à Advanced n service bus deployment - NSBConnyc 2014 by Kijana Woodard

SOLID - Not Just a State of Matter, It's Principles for OO Propriety
SOLID - Not Just a State of Matter, It's Principles for OO ProprietySOLID - Not Just a State of Matter, It's Principles for OO Propriety
SOLID - Not Just a State of Matter, It's Principles for OO Propriety
Chris Weldon
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
deimos
 

Similaire à Advanced n service bus deployment - NSBConnyc 2014 by Kijana Woodard (20)

SOLID - Not Just a State of Matter, It's Principles for OO Propriety
SOLID - Not Just a State of Matter, It's Principles for OO ProprietySOLID - Not Just a State of Matter, It's Principles for OO Propriety
SOLID - Not Just a State of Matter, It's Principles for OO Propriety
 
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
 
From CRUD to messages: a true story
From CRUD to messages: a true storyFrom CRUD to messages: a true story
From CRUD to messages: a true story
 
Advanced #2 networking
Advanced #2   networkingAdvanced #2   networking
Advanced #2 networking
 
The Developer Conference - CloudKit, entendendo a Cloud da Apple
The Developer Conference - CloudKit, entendendo a Cloud da AppleThe Developer Conference - CloudKit, entendendo a Cloud da Apple
The Developer Conference - CloudKit, entendendo a Cloud da Apple
 
Dropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudDropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google Cloud
 
CDI and Weld
CDI and WeldCDI and Weld
CDI and Weld
 
MongoDB Stitch Tutorial
MongoDB Stitch TutorialMongoDB Stitch Tutorial
MongoDB Stitch Tutorial
 
MongoDB World 2018: Keynote
MongoDB World 2018: KeynoteMongoDB World 2018: Keynote
MongoDB World 2018: Keynote
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVCConstruindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
 
當ZK遇見Front-End
當ZK遇見Front-End當ZK遇見Front-End
當ZK遇見Front-End
 
O'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systemsO'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systems
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
 
Devoxx 2012 (v2)
Devoxx 2012 (v2)Devoxx 2012 (v2)
Devoxx 2012 (v2)
 
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
 
MongDB Mobile: Bringing the Power of MongoDB to Your Device
MongDB Mobile: Bringing the Power of MongoDB to Your DeviceMongDB Mobile: Bringing the Power of MongoDB to Your Device
MongDB Mobile: Bringing the Power of MongoDB to Your Device
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRS
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 

Plus de Particular Software

Plus de Particular Software (20)

Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBusScaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
 
Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code
 
An exception occurred - Please try again
An exception occurred - Please try againAn exception occurred - Please try again
An exception occurred - Please try again
 
Tales from the trenches creating complex distributed systems
Tales from the trenches  creating complex distributed systemsTales from the trenches  creating complex distributed systems
Tales from the trenches creating complex distributed systems
 
Got the time?
Got the time?Got the time?
Got the time?
 
Implementing outbox model-checking first
Implementing outbox   model-checking firstImplementing outbox   model-checking first
Implementing outbox model-checking first
 
Reports from the field azure functions in practice
Reports from the field   azure functions in practiceReports from the field   azure functions in practice
Reports from the field azure functions in practice
 
Finding your service boundaries - a practical guide
Finding your service boundaries - a practical guideFinding your service boundaries - a practical guide
Finding your service boundaries - a practical guide
 
Decomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and DockerDecomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and Docker
 
DIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenchesDIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenches
 
Share the insight of ServiceInsight
Share the insight of ServiceInsightShare the insight of ServiceInsight
Share the insight of ServiceInsight
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Making communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBusMaking communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBus
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
 
How to avoid microservice pitfalls
How to avoid microservice pitfallsHow to avoid microservice pitfalls
How to avoid microservice pitfalls
 
Connect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and MessagingConnect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and Messaging
 
Async/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API UpdateAsync/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API Update
 
Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Making workflow implementation easy with CQRS
Making workflow implementation easy with CQRSMaking workflow implementation easy with CQRS
Making workflow implementation easy with CQRS
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Advanced n service bus deployment - NSBConnyc 2014 by Kijana Woodard

  • 1. Advanced NServiceBus Deployment NSBCon NYC 2014 Kijana Woodard / @kijanawoodard
  • 2. Background From Dallas, TX Professional develop since 1996 .net since 1.0 Independent contractor since 2010
  • 3. Around the web kijanawoodard.com twitter.com/kijanawoodard github.com/kijanawoodard linkedin.com/in/kijanawoodard particular forum ravendb forum ddd/cqrs forum hypermedia forum
  • 4. Slides are on GitHub github.com/kijanawoodard/NSBCon-NYC-2014/
  • 6. Big Ball of Mud An application which defies modification
  • 7. BBOM Formal Definition SELECT currentAssignment FROM workHistory WHERE originalDeveloper != me
  • 8. Defense Mechanisms Change control committee Source control committee
  • 9. BBOM Architecure - thedailywtf.com Comment On The Enterprise Dependency
  • 10. BBOM Implementation public class OrderController { ... public OrderController( IOrderRepository orders, IBillingService billing, IShippingService shipping) { _orders = orders; _billing = billing; _shipping = shipping; } public HttpStatusCode Post(Order order) { _orders.Save(order.OrderDetails); _billing.Charge(order.BillingDetails); _shipping.Ship(order.ShippingDetails); return HttpStatusCode.OK; } }
  • 13. Events Implementation public class OrderController { public IBus Bus { get; set; } public HttpStatusCode Post(ProcessOrder order) { Bus.Send(order); return HttpStatusCode.OK; } } ... public class OrderHandler : IHandleMessages<ProcessOrder> { public IBus Bus { get; set; } public void Handle(ProcessOrder message) { //save order... Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); } }
  • 14. Bliss Encapsulation Single Responsibility Open Closed Principle Interface Segregation Principle Dependency Inversion Principle
  • 15. It's almost as if... OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. Alan Kay - 2003
  • 20. Friction Message Conventions Serialization Format Persistence Configuration
  • 21. Harder to Deploy Many Endpoints vs One Application
  • 23. Developer's Opinion of BBOM - thedailywtf.com Comment On The Enterprise Dependency
  • 25. Executive Summary of Messaging
  • 27. Don't Call It a Rewrite public class OrderController { ... public OrderController( IOrderRepository orders, IBillingService billing, IShippingService shipping) { _orders = orders; _billing = billing; _shipping = shipping; } public HttpStatusCode Post(Order order) { _orders.Save(order.OrderDetails); _billing.Charge(order.BillingDetails); _shipping.Ship(order.ShippingDetails); return HttpStatusCode.OK; } }
  • 28. Strangler Pattern - Entry on Strangler Fig Wikipedia http://www.martinfowler.com/bliki/StranglerApplication.html
  • 29. Context Remember that time when we couldn't deploy anything for 6 weeks... Remember that time when the strategic marketing initiative was held up due to a Shipping upgrade...
  • 31. Have No Illusions The Big Ball of Mud will not die easily - Advanced Life Skills
  • 33. Conventions: Web vs Endpoint Separate configuration repo Days to Minutes Smaller, more frequent releases Confidence Repeatability
  • 34. Configuration db alert local http://localhost:8080 alerts@devnull.example.com dev http://localhost:8080 alerts@dev.example.com qa http://qa:8080 alerts@qa.example.com prod http://p532977:8080 alerts@example.com
  • 35. Don't Do an "Automation Project" Over time, layer in... Build scripts powershell / msbuild Team City / Bamboo Deploy scripts powershell Octopus Deploy Monitoring and Metrics Service Insight / Control SCOM Discussion on DevOPS Experience on devopslive.org
  • 37. Bus Stop namespace BusStop.Config { public static class MyConvention { public static Configure MyMessageConventions(this Configure config) { config.DefiningEventsAs(t => t.Namespace != null && t.Namespace.EndsWith(".Contracts")); return config; } } } github.com/andreasohlund/BusStop
  • 46. Decouple Dev from OPS Redeploy without recompile Tie to Platform Tools
  • 48. A 2nd Look at Events Impl public class OrderController { public IBus Bus { get; set; } public HttpStatusCode Post(ProcessOrder order) { Bus.Send(order); return HttpStatusCode.OK; } } ... public class OrderHandler : IHandleMessages<ProcessOrder> { public IBus Bus { get; set; } public void Handle(ProcessOrder message) { //save order... Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); } }
  • 49. One Choice public class OrderController { private IFactory<Duck<Mockable<ProcessOrder>>> _something; public IBus Bus { get; set; } public OrderController(IFactory<Duck<Mockable<ProcessOrder>>> something) { _something = something; } public HttpStatusCode Post(ProcessOrder order) { _something.Process(order); return HttpStatusCode.OK; } } ... public class OrderHandler : IHandleMessages<ProcessOrder> { private IFactory<Duck<Mockable<ProcessOrder>>> _something; public IBus Bus { get; set; } public OrderHandler(IFactory<Duck<Mockable<ProcessOrder>>> something) { _something = something; } public void Handle(ProcessOrder message) {
  • 50. Exploit Decoupling public class OrderController { private readonly IHandleMessages<ProcessOrder> _handler; public IBus Bus { get; set; } public OrderController(IHandleMessages<ProcessOrder> handler) { _handler = handler; } public HttpStatusCode Post(ProcessOrder order) { _handler.Handle(order); return HttpStatusCode.OK; } } ... public class OrderHandler : IHandleMessages<ProcessOrder> { public IBus Bus { get; set; } public void Handle(ProcessOrder message) { //save order... Bus.Publish<IOrderAccepted>(x => x.Id = message.Id); } }
  • 51. Run
  • 56. Break Apart the API? Later.... { "submit-order" : "http://api.example.com/orders" } { "submit-order" : "http://orders.example.com/" } HAL - Hypertext Application Language
  • 57. What about queries? N fanout queries vs 1 for command Volatile queues Could work with proper circuit breakers Easier configuration with mulitple databases
  • 58. Assembly Neutral Interfaces davidfowl.com/assembly-neutral-interfaces/ Consumer Driven Contracts
  • 59. Roslyn What if source files were distrbuted....
  • 61. Advanced NServiceBus Deployment Questions? slides @ github.com/kijanawoodard/NSBCon-NYC-2014/ kijanawoodard.com twitter.com/kijanawoodard