how to swing a service bus like you mean it n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
How to Swing a Service Bus Like You Mean It PowerPoint Presentation
Download Presentation
How to Swing a Service Bus Like You Mean It

Loading in 2 Seconds...

play fullscreen
1 / 32

How to Swing a Service Bus Like You Mean It - PowerPoint PPT Presentation


  • 110 Views
  • Uploaded on

How to Swing a Service Bus Like You Mean It. SOA with NServiceBus. Jim Pelletier @pjimmy mail@thejimmyp.com. What is NServiceBus?. Asynchronous Messaging Framework Durable messaging with MSMQ Moderately Opinionated Event Driven Autonomous Services as opposed to RPC Web Services.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'How to Swing a Service Bus Like You Mean It' - darius


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
how to swing a service bus like you mean it

How to Swing a Service Bus Like You Mean It

SOA with NServiceBus

Jim Pelletier

@pjimmy

mail@thejimmyp.com

what is nservicebus
What is NServiceBus?
  • Asynchronous Messaging Framework
  • Durable messaging with MSMQ
  • Moderately Opinionated
  • Event Driven Autonomous Services as opposed to RPC Web Services
yeah so what about it
Yeah? So… What about it?

SOA Provides:

  • Freedom of design and implementation
  • Unprecedented flexibility for growth & change
  • Waste nearly no code on pure technical concerns

SOA with Messaging

VS.

N-Tier with RPC

outline disclaimer
Outline & Disclaimer
  • Just presenting a different possibility
  • Mainly talking and pictures, with a little code:
    • Intro to Messaging with NServiceBus
    • Messaging Patterns
    • Modeling using Messages
    • Autonomous Services, Boundaries and Decoupling via Messaging
    • Architecture Overview
    • SOA Composite Application Demo
messaging with queues
Messaging with Queues

Send

Receive

Queue

Queue

App

App

Makes for inherently asynchronous systems able to deal with spikes in load

messaging with transactional queues
Messaging with Transactional Queues

Tx

Tx

Send

Receive

Queue

Queue

Save or Update

App

App

Rollback

Rollback

Makes robust applications simple to implement

messaging with durable queues store forward
Messaging with Durable Queues = Store & Forward

Tx

Tx

Send

Receive

Queue

Queue

App

App

Provides an alternative and elegant solution to availability & data loss

durable transactional queues fire forget
Durable Transactional Queues = Fire & Forget

Tx

Tx

Send

Receive

Queue

Queue

App

App

Which we leverage thru NServiceBus to build much simpler, more flexible and scalable solutions

slide9

Subscriber

Publisher

Subscribe

Subscriber

Subscriber

Subscriber

Subscriber

slide10

Subscriber

Publisher

abcdefgh

abcdefgh

abcdefgh

abcdefgh

abcdefgh

Subscriber

Subscriber

Subscriber

Subscriber

decisions based on past events
Decisions Based on Past Events

Order Service

Place Order

Order Placed

Billing Service

Current Debt > Max Debt

Customer Billed

Customer ID

Max Debt

Current Balance

Set Max Debit For Customer

slide12

Code Demo: Stock Trading Website

Ordering Service

Web UI

Web UI

UI

Place Order

IBM +7.56

APPL -2.3

GOOG +0.34

Order Accepted

INTC +0.34

MSFT -5.6

Billing Service

Stock Ticker Service

Customer Billed

modeling with messages
Modeling with Messages

Service

Command

Events

Service

Service

Service

Events

modeling with commands events
Modeling with commands & events

Customer Service

Update Customer

Customer Updated

Address Service

Validation Service

Transaction Service

modeling with commands events1
Modeling with commands & events

Order Service

Place Order

Order Placed

Shipping Service

Order Shipped

Billing Service

Order Billed

Customer Care Service

Customer Notified of Order Placed

polymorphism bc s and ddd oh my
Polymorphism, BC’s and DDD oh my!

Orders Service

Handle Place Order

Place Order

Order Accepted

Order Accepted

Handle Place Order

Handle First Order

Sales Service

Place Customers

First Order

Send Customer Catalogue & Order Forms

New Lead Identified

what is a service
What is a service?

Some codewhich exists exclusively as part of a service providing the sole source of a

given business capability to an organization

what is a service1
What is a service?

It is made up of:

An Autonomous Service

MVC Controllers & Views

XAML & Presenters

  • No “Orchestration” code
  • No“Management” code
  • No Transformation code
  • NoData Access code
  • NoData “Munging” code
  • NoError Handling
  • No Unreachable code
  • Nounintended or unused code paths
  • No code except business abstractions

Business Logic

Message Handlers

Some Persistent Store

what else is a service
What else is a service?
  • Services are autonomous
decoupling with a message schema
Decoupling with a Message Schema

Mgs Schema A

Mgs Schema B

Service A

Service B

Bus

composed application
Composed application

User Application Executable

Layout & Branding Service

Product Catalogue Service

Pricing Service

Order Service

Billing Service

NSB Host

Exec(s).

NSB Host

Exec(s).

NSB Host

Exec(s).

NSB Host

Exec(s).

Bus

code demo crazyjimssoa
Code Demo – CrazyJimsSOA
  • Composing a UI from many logically distinct components
slide23

Layout & Branding Service

MVC Controllers

HTML + JavaScript

Pricing Service

Catalogue Service

Ordering Service

MVC Controllers

MVC Controllers

MVC Controllers

slide24

Layout & Branding Service

MVC Controllers

HTML + JavaScript

{JSON} + <jTemplate \>

{JSON} + <jTemplate \>

{JSON} + <jTemplate \>

Pricing Service

Catalogue Service

Ordering Service

MVC Controllers

MVC Controllers

MVC Controllers

win like this
#WIN like this…
  • Freedom of design and implementation
  • Unprecedented flexibility for growth & change
  • Waste nearly no code on pure technical concerns
thanks resources
Thanks & Resources
  • Thanks to @UdiDahan checkout his ADSD course! - http://www.udidahan.com/training/#Advanced_Distributed_System_Design
  • NServiceBus Website (Documentation & Community Sections are great) – http://www.nservicebus.com/
  • Distributed Podcast - http://distributedpodcast.com/
  • NServiceBus Mailing List - http://tech.groups.yahoo.com/group/nservicebus/
  • Other Mailing Lists –
    • http://groups.google.com/group/dddcqrs?pli=1
    • http://tech.groups.yahoo.com/group/service-orientated-architecture/
    • http://tech.groups.yahoo.com/group/domaindrivendesign/messages
how to swing a service bus like you mean it1

How to Swing a Service Bus Like You Mean It

SOA with NServiceBus

Jim Pelletier

@pjimmy

mail@thejimmyp.com

ac s bc s and ddd oh my
AC’s, BC’s and DDD oh my!

Order Service

Order Placement UI running in a web site

Order Processing running in NServiceBus.Host.exe

what is cqrs
What is CQRS?

AC -Persistent View Model Store

UI

Queries

View Model Updaters

Events

AC – Business Logic

Command Handlers

Commands

where does cqrs fit in the picture
Where does CQRS fit in the picture?

User Application Executable

Layout & Branding Service

Product Service

Pricing Service

Order Service

Billing Service

Commands

Commands

Events

NSB Host

Exec(s).

NSB Host

Exec(s).

NSB Host

Exec(s).

NSB Host

Exec(s).

Bus